wshobson avatar

React State Management

Solid reference for navigating React's state management ecosystem. Covers the decision matrix between Redux Toolkit, Zustand, and Jotai with practical TypeScript examples for each. The Zustand slice pattern and Jotai atomic examples are especially useful for scaling beyond basic useState. Includes React Query patterns for server state separation, which is often overlooked but crucial for modern apps. The selection criteria table saves you from overthinking tool choice. Code examples are production-ready with proper TypeScript, error handling, and performance considerations like selective subscriptions in Zustand.

skills.sh installs
15.9K
GitHub stars
42.4K
last updated
Aug 21, 2026

Install

$ npx -y skills add wshobson/agents --skill react-state-management --agent claude-code

Installs into .claude/skills of the current project.

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

TypeDescriptionSolutions
Local StateComponent-specific, UI stateuseState, useReducer
Global StateShared across componentsRedux Toolkit, Zustand, Jotai
Server StateRemote data, cachingReact Query, SWR, RTK Query
URL StateRoute parameters, searchReact Router, nuqs
Form StateInput values, validationReact Hook Form, Formik

2. Selection Criteria

Sponsors

Details

Repository
github.com/wshobson/agents
Categories
Frontend Development, Backend & APIs

More from wshobson/agents

All 174
1clerk avatarclerk-astro-patternsclerk/skillsAstro patterns with Clerk — middleware, SSR pages, island components, API routes, static vs SSR rendering. Triggers on: astro clerk, clerk astro middleware, ast14.8Kskills.sh installs
2wshobson avatarweb-component-designwshobson/agentsMaster React, Vue, and Svelte component patterns including CSS-in-JS, composition strategies, and reusable component architecture. Use when building UI componen13.6Kskills.sh installs
3resend avatarreact-emailresend/resend-skillsUse when building HTML email templates with React components, adding a visual email editor to an application using the React Email visual editor, rendering emai13.3Kskills.sh installs
4heroui-inc avatarheroui-reactheroui-inc/herouiHeroUI v3 React component library (Tailwind CSS v4 + React Aria). Use when building UIs with HeroUI — creating Buttons, Modals, Forms, Cards; installing @heroui12.6Kskills.sh installs
5msw-git avatarmsw-ui-systemmsw-git/msw-ai-coding-plugins-officialMSW `.ui` single entry point — design + component API + builder + runtime. Anchor/pivot/RectTransform, UIGroup/CanvasGroup hierarchy, layout recipes (HUD/popup/10.5Kskills.sh installs
6resend avatarreact-emailresend/react-emailUse when building HTML email templates with React components, adding a visual email editor to an application using the React Email visual editor, rendering emai10Kskills.sh installs