Child tag won't inherit parent's properties if it's mounted in a loop #1897

5angel opened this Issue Jul 19, 2016 · 4 comments


None yet

3 participants

5angel commented Jul 19, 2016

This time I caught a wild one:

What I think is happening is that 'mount' gets called before props are inherited, causing an inconsistent behavior.

  • Question
  • Bug
  • Discussion
  • Feature request
  • Tip
  • Enhancement
  • Performance
5angel commented Jul 19, 2016

Yup, here it is:

So it seems you should listen to 'update', not to 'mount', if you want to use inherited props.
This one works fine:

Zmaon commented Jul 19, 2016

From what I understand, the issue is simply that parent-tag has not added the entry to its list when mount() is called in child-tag. I don't think that this is a bug...

Here is another plunker illustrating this:

5angel commented Jul 19, 2016

As I mentioned earlier, properties are inherited when parent tag updates, which happens after you mount the child tag.

I can fix this by moving this out of the update callback to the separate function and calling it both there and here


Note that this behavior will be completely removed in riot@3.0.0 #1697

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment