Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Advantages of valtio-signal #8

Open
jeff-wilde-cart opened this issue Feb 25, 2023 · 7 comments
Open

Advantages of valtio-signal #8

jeff-wilde-cart opened this issue Feb 25, 2023 · 7 comments

Comments

@jeff-wilde-cart
Copy link

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
Copy link
Member

dai-shi commented Feb 25, 2023

  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
Copy link

any plan on continuing this?

@dai-shi
Copy link
Member

dai-shi commented Nov 4, 2023

What would you like to do?

@alievrenkut
Copy link

alievrenkut commented Nov 23, 2023

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
Copy link
Member

dai-shi commented Nov 23, 2023

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
Copy link

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

@dai-shi
Copy link
Member

dai-shi commented May 16, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants