react-state-management
Skill4 starsChanged 3 months agoMITView on GitHub
Master modern React state management with Redux Toolkit, Zustand, Jotai, and React Query. Use when setting up global state, managing server state, or choosing between state management solutions.
10 other projects use a version of this, 6 of them edited.
Adopted by
Most recently taken up by
- enes9103/my-claude-agents-skillsword for word, first seen Sep 28, 2026
- ElyzeSolutions/skillsword for word, first seen Aug 6, 2026
- Nupke/react-claude-skillstheir own version, first seen May 27, 2026
- codecharmhq/claude-code-skillstheir own version, first seen May 17, 2026
- SuarezPM/Apohara-Catalystedited, first seen May 12, 2026
- GPTtang/skill-atlasedited, first seen Mar 22, 2026
Used with
Projects with it also use python-project-structure.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
Aver005Skillpython-project-structure
Python project organization, module architecture, and public API design. Use when setting up new projects, organizing modules, defining public interfaces with __all__, or planning directory layouts.
Also in 3 projects that use this
Other versions10 projects use a version of this.
Word for word · 2
- ElyzeSolutions/skills★ 1100% same
- enes9103/my-claude-agents-skills★ 0100% same
Edited · 6
- xfstudio/skills★ 933% same
- GPTtang/skill-atlas★ 435% same
- ai4brands-design/claude-skills★ 233% same
- Aver005/agent-skills★ 235% same
- CodeWithBehnam/cc-docs★ 236% same
- SuarezPM/Apohara-Catalyst★ 136% same
Wrote their own version · 2
- codecharmhq/claude-code-skills★ 1same name
- Nupke/react-claude-skills★ 1same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository103 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- harness-installSkill
- ab-test-setupSkill
- accessibility-complianceSkill
- accessibilitySkill
- agent-architecture-auditSkill
- agent-evalSkill
- agent-harness-constructionSkill
- agentic-engineeringSkill
- agent-introspection-debuggingSkill
- ai-regression-testingSkill
- ai-seoSkill
- anthropic-coursesSkill
- anthropic-sdk-phpSkill
- anthropic-sdk-pythonSkill
- api-connector-builderSkill
- architecture-decision-recordsSkill
- architecture-patternsSkill
- article-writingSkill
- async-python-patternsSkill
- auth-implementation-patternsSkill
- backend-patternsSkill
- bash-defensive-patternsSkill
- bats-testing-patternsSkill
- block-no-verify-hookSkill
- blueprintSkill
- brainstormingSkill
- browser-testing-with-devtoolsSkill
- churn-preventionSkill
- ci-cd-and-automationSkill
- citation-engineSkill
- ckSkill
- claude-code-security-reviewSkill
- claude-cookbooksSkill
- click-path-auditSkill
- codebase-onboardingSkill
- coding-standardsSkill
- competitor-alternativesSkill
- connections-optimizerSkill
- content-engineSkill
- content-hash-cache-patternSkill
- context-budgetSkill
- context-driven-developmentSkill
- context-engineeringSkill
- continuous-agent-loopSkill
- cost-aware-llm-pipelineSkill
- cost-aware-routingSkill
- cost-trackingSkill
- councilSkill
- cqrs-implementationSkill
- crosspostSkill
- customer-billing-opsSkill
- dashboard-builderSkill
- data-scraper-agentSkill
- data-storytellingSkill
- data-throughput-acceleratorSkill
- deployment-patternsSkill
- docker-patternsSkill
- documentation-and-adrsSkill
- e2e-testingSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
3 rules. 3 are common, 0 are distinctive, and 0 are very specific to this project.
3
Common
Most of the 7 edited versions we read keep these.
0
Distinctive
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Common: line 92
Colocate state: - Keep state as close to where it's used as possible
- Common: line 100
Don't over-globalize: - Not everything needs to be in global state
- Common: line 102
Don't mutate directly: - Always use immutable updates
“Common” is measured: kept by at least 6 in 10 of the 7 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
React State Management
Comprehensive guide to modern React state management patterns, from local component state to global stores and server state synchronization.
When to Use This Skill
- 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
1. State Categories
| Type | Description | Solutions |
| Local State | Component-specific, UI state | useState, useReducer |
| Global State | Shared across components | Redux Toolkit, Zustand, Jotai |
| Server State | Remote data, caching | React Query, SWR, RTK Query |
| URL State | Route parameters, search | React Router, nuqs |
| Form State | Input values, validation | React Hook Form, Formik |
2. Selection Criteria
Small app, simple state → Zustand or Jotai
Large app, complex state → Redux Toolkit
Heavy server interaction → React Query + light client state
Atomic/granular updates → JotaiQuick Start
Zustand (Simplest)
// store/useStore.ts
import { create } from 'zustand'
import { devtools, persist } from 'zustand/middleware'
interface AppState {
user: User | null
theme: 'light' | 'dark'
setUser: (user: User | null) => void
toggleTheme: () => void
}
export const useStore = create<AppState>()(
devtools(
persist(
(set) => ({
user: null,
theme: 'light',
setUser: (user) => set({ user }),
toggleTheme: () => set((state) => ({
theme: state.theme === 'light' ? 'dark' : 'light'
})),
}),
{ name: 'app-storage' }
)
)
)
// Usage in component
function Header() {
const { user, theme, toggleTheme } = useStore()
return (
<header className={theme}>
{user?.name}
<button onClick={toggleTheme}>Toggle Theme</button>
</header>
)
}Detailed patterns and worked examples
Detailed pattern documentation lives in references/details.md. Read that file when the navigation tier above is insufficient.
Best Practices
Do's
- Colocate state - Keep state as close to where it's used as possible
- Use selectors - Prevent unnecessary re-renders with selective subscriptions
- Normalize data - Flatten nested structures for easier updates
- Type everything - Full TypeScript coverage prevents runtime errors
- Separate concerns - Server state (React Query) vs client state (Zustand)
Don'ts
- Don't over-globalize - Not everything needs to be in global state
- Don't duplicate server state - Let React Query manage it
- Don't mutate directly - Always use immutable updates
- Don't store derived data - Compute it instead
- Don't mix paradigms - Pick one primary solution per category
Migration Guides
From Legacy Redux to RTK
// Before (legacy Redux)
const ADD_TODO = "ADD_TODO";
const addTodo = (text) => ({ type: ADD_TODO, payload: text });
function todosReducer(state = [], action) {
switch (action.type) {
case ADD_TODO:
return [...state, { text: action.payload, completed: false }];
default:
return state;
}
}
// After (Redux Toolkit)
const todosSlice = createSlice({
name: "todos",
initialState: [],
reducers: {
addTodo: (state, action: PayloadAction<string>) => {
// Immer allows "mutations"
state.push({ text: action.payload, completed: false });
},
},
});Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

