[Design Decision Question] why change to recoil from valtio? #96
Replies: 3 comments 1 reply
-
Nothing in particular, just testing out the latest state management libs. I was curious how one could model external state sync (e.g. a matchMedia query) with Recoil. I do have some concerns about Valtio's compatibility with Concurrent Mode (which this project uses). I will let some time pass before I re-evaluate it. See if it gets adoptions from other projects, etc. Valtio was dead-simple to use and with almost no ceremony. You will appreciate its simplicity coming from MobX and other libs. It's very small too. However I never modeled anything complicated with it, so I don't know how it holds up in larger projects. |
Beta Was this translation helpful? Give feedback.
-
Another issue with Valtio is that it doesn't play well with React Fast Refresh (hot reload). This is a common issue with libs that keep state "outside" React. You can read more information about this: pmndrs/valtio#36 |
Beta Was this translation helpful? Give feedback.
-
I've been considering moving over a huge project from mobx to valtio , so I'm really curious what prompted the change. Any insight would be appreciated! I have been skeptical of valtio's performance for large store <-> component graphs since it doesn't highjack render directly
Beta Was this translation helpful? Give feedback.
All reactions