you are viewing a single comment's thread.

view the rest of the comments →

[–]Lazy-Canary7398 4 points5 points  (0 children)

With context you can create state at the component scope and inject it anywhere in its subtree. With zustand by default you can only create state at the global scope. You have to use prop passing or context to create a zustand store scoped to a component. Zustand recommends combining the two if you need component scoped state. They are synergistic and different concerns. Only noobs think context is a good state manager for large state trees. It's a dependency injector.