You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So while there are functions to navigate one level of component tree, there should be also functions which navigate multiple levels, do it recursively. Imagine a jQuery selectors for selecting ancestor or descendant components.
The issue is that often you would want to find the first component matching some condition, not all of them. So it might be good to provide this as an iterator?
We should also document this and explain proposed use (finding by matching on some property and not number of levels, accessing components' state/public API). Explain that moving across data contexts is fragile and that better is to move between components and then call .data() on them (or any other state, reactive field).
The text was updated successfully, but these errors were encountered:
mitar
changed the title
Make more helper fucntions to navigate the component tree
Make more helper functions to navigate the component tree
Oct 13, 2015
So maybe static methods could be passed down to children automatically, and with them being aware of their parents, they could just invoke method within parent to whom method belongs.
So while there are functions to navigate one level of component tree, there should be also functions which navigate multiple levels, do it recursively. Imagine a jQuery selectors for selecting ancestor or descendant components.
The issue is that often you would want to find the first component matching some condition, not all of them. So it might be good to provide this as an iterator?
We should also document this and explain proposed use (finding by matching on some property and not number of levels, accessing components' state/public API). Explain that moving across data contexts is fragile and that better is to move between components and then call
.data()
on them (or any other state, reactive field).The text was updated successfully, but these errors were encountered: