Zustand
- Category
- Frameworks and libraries
- Docs outline
- 13 sections
Official docs outline
zustand.docs.pmnd.rs- Introduction
Creating a store with create and using it as a hook in React components.
- Updating state
Using set, partial updates, nested state and immutable updates.
- Immutable state and merging
How set merges shallowly and how to replace or deeply update state.
- Selectors and preventing rerenders
Selecting slices of state and useShallow to avoid unnecessary re-renders.
- Slices pattern
Splitting a large store into composable slices.
- TypeScript guide
Typing stores with the curried create<T>()() form, and advanced typing for middleware.
- Persist middleware
Persisting store state to localStorage or other storage and rehydration options.
- Devtools middleware
Redux DevTools integration and time-travel debugging.
- Immer middleware
Writing mutable-style updates that produce immutable state.
- subscribeWithSelector middleware
Subscribing to granular store updates outside React.
- Vanilla stores (createStore)
Using stores without React and binding them with useStore.
- SSR, hydration and Next.js
Avoiding shared server state and hydration mismatches in Next.js.
- Testing
Resetting stores and testing components that use Zustand.
Each section links to the official page. Titles and summaries by Extra Credit; the docs belong to their authors.