react-state-management
by wshobsonMaster 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.
Overview
What is react-state-management?
react-state-management is a practical skill for mastering modern state management in React applications. It covers key tools and patterns including Redux Toolkit, Zustand, Jotai, and React Query, helping developers handle local, global, and server state efficiently. This skill is designed for frontend developers who need to choose the right state management solution for their project, optimize performance, and maintain scalable code.
Who should use this skill?
This skill is ideal for React developers, frontend engineers, and teams building complex user interfaces. Whether you are starting a new project, migrating from legacy Redux, or need to manage server data and caching, react-state-management provides actionable guidance for selecting and implementing the best approach.
Problems solved by react-state-management
- Simplifies choosing between Redux Toolkit, Zustand, Jotai, and React Query
- Helps set up global state and manage server state
- Supports optimistic updates and debugging state issues
- Guides migration from older Redux patterns to modern solutions
How to Use
Installation Steps
- Install the skill using:
npx skills add https://github.com/wshobson/agents --skill react-state-management - Review the
SKILL.mdfile for a comprehensive overview of state management patterns and selection criteria. - Explore supporting files such as
README.md,AGENTS.md,metadata.json, and anyrules/,resources/, orreferences/directories for additional context.
Adapting the workflow
- Use the guidance to evaluate your app's state complexity and choose the right tool: Zustand or Jotai for simple apps, Redux Toolkit for large-scale state, React Query for server data.
- Integrate recommended libraries and patterns into your project, customizing as needed for your architecture.
- Reference the selection criteria table and quick start examples in
SKILL.mdto streamline setup.
File structure highlights
- Start with
SKILL.mdfor editorial guidance - Check other files for implementation details and references
FAQ
When should I use react-state-management?
Use react-state-management when you need to set up global state, manage server data, or decide between state management libraries for a React frontend project.
Which libraries are covered?
The skill covers Redux Toolkit, Zustand, Jotai, React Query, SWR, RTK Query, React Router, nuqs, React Hook Form, and Formik.
How do I decide which solution to use?
Refer to the selection criteria in SKILL.md: small/simple apps use Zustand or Jotai; large/complex apps use Redux Toolkit; heavy server interaction use React Query.
Where can I find implementation examples?
Quick start examples and solution comparisons are provided in SKILL.md. For deeper implementation, check referenced files and directories.
How do I preview the skill files?
Open the Files tab to view the full file tree, including nested references and helper scripts.
