Advantages of valtio-signal
jeff-wilde-cart opened this issue · 7 comments
What are the advantages of valtio-signal over useSnapshot?
In SolidJs signals do more targeted DOM updates so you don't tender. Is this just a wrapper around useSnapshot or are there any rendering advantages as well?
Why would I use valtio-signal over useSnapshot?
- It may bypass diffing (like solidjs) for some cases (It's actually not easy to predict without understanding the internals, and things may change.)
- Coding style. It's a little shorter and you don't need to follow the hooks rule.
That said, please be aware that this lib is still experimental.
any plan on continuing this?
What would you like to do?
Is there a way to make this work like real signal which If I understand correctly means changing DOM directly and skipping all diffing, render phase and VirtualDOM.
Nowadays I think react can easily become very slow for large client side SPA. Not everybody can use SSR to speed up their apps and React ecosystem focus too much on SSR and leaving us the SPA guys behind :-(
Is there a way to make this work like real signal which If I understand correctly means changing DOM directly and skipping all diffing, render phase and VirtualDOM.
Yes, it does. While it's best effort, it will bypass diffing and change DOM directly when possible.
@dai-shi Is this library is production ready? Thanks for the great work.
I wouldn't say so, but feel free to try and find how stable it is.