Battle-tested patterns for managing complex client state in React applications using **Zustand**, **Jotai**, and **React Query**. This collection covers the patterns that emerge when you move beyond s
Browse the actual product documentation and code examples included in this toolkit.
Key features of State Management Patterns
• Store Slices — Split large stores into composable slices that share a single store instance. Includes typed slice creators and cross-slice communication. • Middleware Stack — Logging, devtools integration, performance tracking, and immer middleware composed together. • Persistence Layer — Storage adapters (localStorage, sessionStorage, IndexedDB) with migration support for evolving store shapes. • Atoms & Derived Atoms — Primitive atoms, computed atoms with selectors, and write-only atoms for complex updates. • Async Atoms — Data fetching atoms with loading/error states, retry logic, and Suspense integration. • Atom Families — Parameterized atoms for managing collections (e.g., per-item expanded state, per-tab filters).
Store Slices — Split large stores into composable slices that share a single store instance. Includes typed slice creators and cross-slice communication.
Middleware Stack — Logging, devtools integration, performance tracking, and immer middleware composed together.
Persistence Layer — Storage adapters (localStorage, sessionStorage, IndexedDB) with migration support for evolving store shapes.
Atoms & Derived Atoms — Primitive atoms, computed atoms with selectors, and write-only atoms for complex updates.
Async Atoms — Data fetching atoms with loading/error states, retry logic, and Suspense integration.
Atom Families — Parameterized atoms for managing collections (e.g., per-item expanded state, per-tab filters).
Configure State Management Patterns parameters to see how the product works.
# Install the libraries you want to use (pick one or combine): npm install zustand immer npm install jotai npm install @tanstack/react-query # Copy the patterns you need into your project cp -r src/zustand/ your-project/src/state/