3 ms·
Not sure how this is any more natural than JSX/HTML. It looks much messier and harder to follow. Also I’d like to see how they handle mount/unmount logic like
by robertoandred 3y ago
Not sure how this is any more natural than JSX/HTML. It looks much messier and harder to follow.
Also I’d like to see how they handle mount/unmount logic like event listeners.
- _old_dude_ 3y agoNo shadow dom, so no mount/unmount logic ! A whole new DOM sub-tree is re-created each time a value change. There is an example in the tutorial about how state are handled [1]. [1] https://vanjs.org/tutorial#state-binding https://vanjs.org/tutorial#state-binding
- robertoandred 3y agoSo how do you clean up global event listeners, clear intervals and timeouts, etc when a component unmounts?
- paulddraper 3y agos/shadow/virtual/