Skip to content
public-library›Rules›Zustand›Use Zustand only for shared client state

Use Zustand only for shared client state

Put state in Zustand only when it is client-owned and shared by components that are not close in the tree. Keep single-component state local, shareable navigation state in the URL, and server data in the project's server-state layer, such as TanStack Query.

In the full rule