riot-js

Open full view…

Tag inside yield is not updated

pysta
Wed, 14 Sep 2016 11:14:31 GMT

I've encoutered problem when I have tag inside yield, it works OK if data is loaded straight away, but if I load data asynchronously tag is not updated at all, see example on codepen http://codepen.io/Pysta/pen/pEyoBY . Am I doing something wrong, or is it a bug? Thanks in advance for any suggestions/help.

acousticseagull
Wed, 21 Sep 2016 16:04:10 GMT

You need to pass items with self.update(). --- self.update({ items: items }) --- http://codepen.io/anon/pen/pENBQx

tonylua
Thu, 27 Oct 2016 04:38:45 GMT

try <sub-comp>{parent.xxx}</sub-comp>

dongood
Sun, 19 Feb 2017 02:39:52 GMT

@tonylua Thanks for that reply. I had been struggling with a Riot 2 to 3 upgrade issue that was driving me crazy. My Riot2 application leverages sub-tags with embedded `{ }` and then uses `<yield/>` to embed the parent defined markup. Everything worked fine in Roit2, but not in Riot3. Didn't realize you had to add `parent.` to all of the references.