-
I have a problem to understand how |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments
-
See this piece of source code for the mechanism: https://github.com/vanjs-org/van/blob/main/src/van.js#L11. Also, you are encouraged to watch this 7-minute video: https://www.youtube.com/watch?v=Oh2IEVqarHs, which is a good walkthrough on how VanJS is implemented. |
Beta Was this translation helpful? Give feedback.
-
I saw this
How is it possible to collect all three states by just running this code? If |
Beta Was this translation helpful? Give feedback.
-
Please see https://vanjs.org/advanced#conditional-state-binding. Basically, we're collecting dependency states every time the binding function is being executed. Thus if |
Beta Was this translation helpful? Give feedback.
-
I'd like to add that if u r coming from React;
|
Beta Was this translation helpful? Give feedback.
See this piece of source code for the mechanism: https://github.com/vanjs-org/van/blob/main/src/van.js#L11.
Also, you are encouraged to watch this 7-minute video: https://www.youtube.com/watch?v=Oh2IEVqarHs, which is a good walkthrough on how VanJS is implemented.