state-management

📁 redpanda-data/console 📅 Jan 24, 2026
25
总安装量
7
周安装量
#14822
全站排名
安装命令
npx skills add https://github.com/redpanda-data/console --skill state-management

Agent 安装分布

claude-code 6
gemini-cli 5
github-copilot 4
codex 4
opencode 4
antigravity 3

Skill 文档

State Management

Choose the right state solution for each use case.

Activation Conditions

  • Managing global state
  • Persisting state across navigation
  • Cross-component data sharing
  • Questions about Zustand vs React Query

Quick Reference

Action Rule
Read from store use-zustand-selectors.md
Persist state use-zustand-persist.md
Fetch server data use-react-query-for-server.md

Decision Tree

Is it server data (API response)?
├── Yes → React Query / Connect Query
│         (caching, refetching, invalidation)
└── No → Is it URL state?
    ├── Yes → React Router
    │         (search params, path params)
    └── No → Is it form state?
        ├── Yes → React Hook Form
        │         (validation, submission)
        └── No → Is it shared across components?
            ├── Yes → Zustand
            │         (global, persisted)
            └── No → useState / useReducer
                      (local component state)

Rules

See rules/ directory for detailed guidance.