state-management

Guide React state management with Zustand, Redux Toolkit, Jotai, and React Query.

3|1|Updated Feb 2, 2026
One-click install
npx skills add https://github.com/HouseGarofalo/claude-code-base --skill state-management-housegarofalo
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: state-management
Source: https://github.com/HouseGarofalo/claude-code-base/tree/main/.claude/skills/state-management
Command: npx skills add https://github.com/HouseGarofalo/claude-code-base --skill state-management-housegarofalo

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps developers choose and implement the most effective state management solutions for their React applications, preventing common pitfalls and optimizing performance.

Core Features & Use Cases

  • Guidance on State Types: Differentiates between local UI, server, global UI, and complex global state.
  • Library Examples: Provides practical code examples for Zustand, React Query, Jotai, and Redux Toolkit.
  • Decision Guide: Offers a clear flowchart to select the right tool for specific state management needs.
  • Use Case: For a complex e-commerce application, this Skill guides you to use React Query for fetching product data, Zustand for managing the shopping cart, and useState for local component interactions.

Quick Start

Use the state-management skill to implement a basic counter using Zustand.

Frequently Asked Questions about state-management

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I choose the right React state management library for my application?

Choosing React state management requires differentiating between local UI, server, global UI, and complex global state. A decision flowchart helps select the right tool, like Zustand for global UI or React Query for server state, ensuring a scalable architecture.

When should I use React Query instead of Redux Toolkit for state management?

Use React Query for server state like fetching product data, and Redux Toolkit for complex global state. Differentiating state types ensures you apply the correct library, optimizing performance and preventing common state architecture pitfalls.

How do I implement a basic store using Zustand in a React application?

Implement a basic Zustand store by defining state and actions within a single hook. This Skill provides practical code snippets to create scalable and performant global UI state management solutions without boilerplate.

What is the best way to manage an e-commerce shopping cart state in React?

The best way to manage an e-commerce shopping cart is using Zustand for the cart state, React Query for fetching product data, and useState for local component interactions. This separation optimizes performance and scalability.

Do I need a complex state management library for local UI interactions in React?

You do not need a complex state management library for local UI interactions; use React's built-in useState. Libraries like Jotai or Redux Toolkit are designed for global UI or complex global state scenarios.