state-management-rules

Select React state management tools based on scope and change frequency.

3|Updated Apr 12, 2026
One-click install
npx skills add https://github.com/mauriciodelrio/delriodev-skills --skill state-management-rules
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: state-management-rules
Source: https://github.com/mauriciodelrio/delriodev-skills/tree/main/es-skills/software/frontend/state-management-rules
Command: npx skills add https://github.com/mauriciodelrio/delriodev-skills --skill state-management-rules

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Los desarrolladores de React a menudo deben decidir entre múltiples herramientas de gestión de estado y enfrentan errores comunes al seleccionar o implementar la solución incorrecta.

Core Features & Use Cases

  • Decision Tree: guía paso‑a‑paso para elegir entre useState, useReducer, Context, Zustand, Jotai, Signals y TanStack Query.
  • Code Patterns: ejemplos listos para copiar de cada herramienta, incluidas buenas prácticas y gotchas.
  • Comparative Table: referencia rápida de pros y contras de cada opción.
  • Use Cases: gestión de estado local simple, estado global de UI, estado atómico, estado de servidor y estado derivado.

Quick Start

Pide al agente que seleccione y configure la herramienta de gestión de estado adecuada para tu componente React según su complejidad y frecuencia de cambios.

Frequently Asked Questions about state-management-rules

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

FAQPage Schema
How do I choose the right React state management tool for my component?

Choosing React state management tools requires evaluating component scope and change frequency. A decision tree guides you through selecting useState, useReducer, Context, Zustand, Jotai, Signals, or TanStack Query based on your specific state needs.

When should I use Zustand vs Jotai for global state in React?

Zustand suits centralized global UI state, whereas Jotai handles atomic state management. A comparative table provides a quick reference of pros and cons for Zustand, Jotai, and other tools to help you select based on your state structure.

What is the best way to manage server state in React with TanStack Query?

TanStack Query is the recommended approach for server state in React. The guidelines provide ready-to-copy code patterns and best practices for fetching, caching, and synchronizing server data to avoid common state management errors.

Do I need useReducer or is useState enough for local React state?

useState is sufficient for simple local state, while useReducer fits complex state logic involving multiple sub-values. The decision tree evaluates local state complexity and change frequency to recommend the correct React hook.

How do Signals compare to Context for React state management?

Signals offer fine-grained reactivity for high-frequency updates, while Context is better for static global UI state. The guidelines compare both approaches with code examples and highlight performance gotchas to prevent unnecessary re-renders.