I am new to this enyo framework, I want to know how we can pass data to lower most child. Currently I'm storing data in published variable of Main Kind(parent) and than getting in its child by "this.owner.varName" and than again saving this to child published variable and getting the same in its child in same way.
0 ·
Comments
https://github.com/enyojs/enyo/wiki/Event-Handling
How the data are send?
- N -> N-1 -> N-2
- N-2 -> N-1 -> N
In fact the question is : Do you only know N or do you know N-2P.S. N, N-1 and N-2 are your elements, (N-2 is a child of N-1, and N-1 a child of N)
The solution (whatever is the direction of data propagation) could be a Dispatcher/Listener design pattern (that can be achieved by enyo.Signals or by sending an custom event through children or parents)
We have the waterfall and waterfallDown methods to allow sending events to your children. This is useful when you need to broadcast things. For example, in the CryptoTweets sample, I used waterfallDown to send letter guesses from the App/Controller to all the cells.