sdlc-react-state-management
State management decision tree for React SPAs: useState/useReducer, Context API, Zustand, Jotai, Redux Toolkit, TanStack Query, SWR. Detect what's installed and apply matching patterns. Use this skill to: - Pick the right state tool for the data shape (local / shared UI / server / form). - Use Context correctly (and know when to switch to Zustand/Jotai). - Implement a Zustand or Jotai store. - Set up TanStack Query for server state with caching, pagination, mutations. - Avoid common mistakes (overusing Redux, prop drilling, forgetting query invalidation). Do NOT use this skill for: - General hook conventions (see react-conventions). - Form state specifically (see react-forms). - Routing state (see react-routing). - Testing stores/queries (see react-testing).
Pinned to revision 80fb8ed90710, so it is the text this page describes rather than whatever the author pushed since.
Files
Every link opens the file at its source, pinned to the revision this page describes.