valtiojs / valtio-signal

Another React binding for Valtio proxy state
MIT License
70 stars 0 forks source link

Advantages of valtio-signal #8

Open jeff-wilde-cart opened 1 year ago

jeff-wilde-cart commented 1 year ago

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?

dai-shi commented 1 year ago
  1. It may bypass diffing (like solidjs) for some cases (It's actually not easy to predict without understanding the internals, and things may change.)
  2. 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.

owenizedd commented 10 months ago

any plan on continuing this?

dai-shi commented 10 months ago

What would you like to do?

alievrenkut commented 9 months ago

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 :-(

dai-shi commented 9 months ago

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.

Nishchit14 commented 3 months ago

@dai-shi Is this library is production ready? Thanks for the great work.

dai-shi commented 3 months ago

I wouldn't say so, but feel free to try and find how stable it is.