Loading...
Loading...
Manage client and server state with Zustand stores and React Query patterns.
npx skill4agent add redpanda-data/console state-management| Action | Rule |
|---|---|
| Read from store | |
| Persist state | |
| Fetch server data | |
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/