React State Management
Comprehensive guide to modern React state management patterns, from local component state to global stores and server state synchronization.
Do not use this skill when
- The task is unrelated to react state management
- You need a different domain or tool outside this scope
Instructions
- Clarify goals, constraints, and required inputs.
- Apply relevant best practices and validate outcomes.
- Provide actionable steps and verification.
- If detailed examples are required, open
resources/implementation-playbook.md.
Use this skill when
- Setting up global state management in a React app
- Choosing between Redux Toolkit, Zustand, or Jotai
- Managing server state with React Query or SWR
- Implementing optimistic updates
- Debugging state-related issues
- Migrating from legacy Redux to modern patterns
Core Concepts
🧠Knowledge Modules (Fractal Skills)
1. [1. State Categories](./sub-skills/1-state-categories.md)
2. [2. Selection Criteria](./sub-skills/2-selection-criteria.md)
3. [Zustand (Simplest)](./sub-skills/zustand-simplest.md)
4. [Pattern 1: Redux Toolkit with TypeScript](./sub-skills/pattern-1-redux-toolkit-with-typescript.md)
5. [Pattern 2: Zustand with Slices (Scalable)](./sub-skills/pattern-2-zustand-with-slices-scalable.md)
6. [Pattern 3: Jotai for Atomic State](./sub-skills/pattern-3-jotai-for-atomic-state.md)
7. [Pattern 4: React Query for Server State](./sub-skills/pattern-4-react-query-for-server-state.md)
8. [Pattern 5: Combining Client + Server State](./sub-skills/pattern-5-combining-client-server-state.md)
9. [Do's](./sub-skills/dos.md)
10. [Don'ts](./sub-skills/donts.md)
11. [From Legacy Redux to RTK](./sub-skills/from-legacy-redux-to-rtk.md)
Use this skill with your AI agent:
Open on Skill Issue to copy, download, or add to your library.
Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.