React State Management: Can I Just Use Zustand Now?
I recently restarted a small project, and Redux felt like overkill, so I tried Zustand. The code is definitely shorter and more convenient, but will things be different as the project scales?
I'm curious how you combine Redux Toolkit, Zustand, or React Query in real-world projects. If you have any recommended patterns, please share them.
9 answers
For small projects, Zustand is enough, I agree. But that’s kind of a separate matter from what happens when the scale grows.
React Query and Zustand have different roles... If you split server state with Query and client global state with Zustand, they barely conflict. Just making this distinction solves half the problem.
Well, I’m not so sure about that. I think it’s risky to choose it just because “the code is short and convenient.” Once you start dumping everything into a single store, Zustand can quickly turn into spaghetti too. In the end, it’s a matter of discipline, not the library—but it bothers me a bit that it’s talked about like a silver bullet...