state-management-expert

Guide React state management with library selection and architecture decisions.

Updated Apr 23, 2025
One-click install
npx skills add https://github.com/ripgraphics/authorsinfo --skill state-management-expert-ripgraphics
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: state-management-expert
Source: https://github.com/ripgraphics/authorsinfo/tree/main/.cursor/skills/state-management-expert
Command: npx skills add https://github.com/ripgraphics/authorsinfo --skill state-management-expert-ripgraphics

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps developers architect and optimize state management in React applications, addressing issues from choosing the right library to resolving complex state logic and performance bottlenecks.

Core Features & Use Cases

  • State Architecture Decisions: Recommends appropriate state management solutions (Redux Toolkit, Zustand, Jotai, React Query, Context API) based on application needs.
  • Performance Optimization: Identifies and resolves state-related performance issues.
  • Code Review: Provides a checklist for best practices in state management.
  • Use Case: A developer is unsure whether to use Zustand or Redux Toolkit for their new global state needs and wants to ensure their current implementation is performant.

Quick Start

Analyze the current state management strategy in the project and recommend the best approach for global UI state.

Frequently Asked Questions about state-management-expert

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

FAQPage Schema
What is the best way to manage React state for my application?

Choosing the best React state management library requires matching the tool to your state type. Use React Query for server state, Zustand or Redux Toolkit for global UI state, and Context API for localized low-frequency updates to ensure robust architecture and performance optimization.

When do I need React Query versus Redux Toolkit for state management?

You need React Query for server state management like data fetching and caching, whereas Redux Toolkit is designed for synchronous client-side global UI state. Selecting the right library based on state type prevents unnecessary complexity and resolves performance bottlenecks.

How do I optimize React state management performance and identify anti-patterns?

Optimize React state performance by identifying anti-patterns like unnecessary re-renders and improper hook usage. Review your implementation against best practice checklists and use decision trees to select performant libraries like Zustand or Jotai for complex state logic.

Should I use Zustand or Context API for global UI state in React?

Use Zustand for global UI state when you need fine-grained control over component re-renders and performance optimization. Context API is suitable for low-frequency state updates but can trigger unnecessary re-renders in large component trees, making Zustand the safer choice for complex applications.

Does Redux Toolkit work well with React Query for managing server state?

Redux Toolkit and React Query can work together, but React Query should exclusively handle server state to avoid duplication. Redux Toolkit should manage client-side global UI state, allowing each library to address its specific state scenario without overlapping responsibilities.