react-state-management | Skill Performance & Reviews | TopRankSkills

TopRank Skills

Home / Skills / tools / react-state-management

react-state-management

maintained by HoangNguyen0403

star 143 account_tree 48 verified_user MIT License
bolt View GitHub

name: React State Management description: Standards for managing local, global, and server state. metadata: labels: [react, state, redux, zustand, context] triggers: files: ['/*.tsx', '/*.jsx'] keywords: [state, useReducer, context, store, props]

React State Management

Priority: P0 (CRITICAL)

Choosing the right tool for state scope.

Implementation Guidelines

  • Local: useState. useReducer if complex (state machine).
  • Derived: const fullName = first + last. No state sync.
  • Context: DI, Theming, Auth. Not for high-freq data.
  • Global: Zustand/Redux for app-wide complex flow.
  • Server Cache: Use React.cache (RSC) to dedupe requests per render.
  • Server State: React Query / SWR / Apollo. Cache != UI State.
  • URL: Store filter/sort params in URL (Source of Truth).
  • Immutability: Never mutate. Use spread or Immer.

Anti-Patterns

  • No Prop Drilling > 2: Use Context/Composition.
  • No Mirroring Refs: Don't copy props to state.
  • No Multi-Source: Single Source of Truth.
  • No Context Abuse: Context causes full-tree re-render.

Reference & Examples

For Zustand, Redux Toolkit, and TanStack Query patterns: See references/REFERENCE.md.

Related Topics

hooks | component-patterns | performance

chat Comments (0)

chat_bubble_outline

No comments yet. Be the first to share your thoughts!

Skill Details

GitHub Stars 143
GitHub Forks 48
Created Jan 2026
Last Updated 8个月前
tools tools architecture patterns

Related Skills

dagger-design-proposals
chevron_right
nestjs-expert
chevron_right
docker-expert
chevron_right
kafka-architecture
chevron_right
kafka-streams-topology
chevron_right

Build your own?

Join 12,000+ developers contributing to the Claude ecosystem.