What problem does it solve?
Streamlines React state management by offering a practical set of Zustand patterns, including basic stores, persistence, selectors, async actions, slices, Immer, DevTools, and external usage.
Core Features & Use Cases
- Basic Store: simple, typed Zustand store for component state.
- Persist Middleware: persists state to localStorage to survive refreshes.
- Selectors (Zustand 5): select precise fields to minimize re-renders and use shallow for multiple fields.
- Async Actions: fetch and manage asynchronous data with loading and error handling.
- Slices Pattern: compose multiple slices into a single, modular store.
- Immer Middleware: enable immutable mutations via Immer.
- DevTools: integrate with Zustand devtools for debugging and inspection.
- Outside React: read and subscribe to stores outside components.
Quick Start
Create a Zustand store using zustand-5 patterns and integrate it into a React component to manage simple state.