Build type-safe global state in React with Zustand. Supports TypeScript, persist middleware, devtools, slices pattern, and Next.js SSR with hydration handling. Prevents 6 documented errors. Use when setting up React state, migrating from Redux/Context, or troubleshooting hydration errors, TypeScript inference, infinite render loops, or persist race conditions.
90
86%
Does it follow best practices?
Impact
100%
2.32xAverage score across 3 eval scenarios
Passed
No known issues
TypeScript store patterns and selector safety
Double parentheses syntax
0%
100%
Separate state interface
0%
100%
Separate actions interface
0%
100%
Hook exported, not store
100%
100%
No inline object selector
100%
100%
Separate selectors OR useShallow
100%
100%
useShallow import path
100%
100%
Updater function for derived state
100%
100%
Immutable updates
100%
100%
Persist middleware and Next.js hydration safety
Persist import path
100%
100%
Double parentheses syntax
100%
100%
Unique storage keys
100%
100%
_hasHydrated flag in store
0%
100%
onRehydrateStorage callback
0%
100%
Hydration guard in component
100%
100%
Zustand version pinned to v5.0.10+
0%
100%
No unstable_ssrSafe usage
100%
100%
createJSONStorage usage
100%
100%
Hooks exported, not instances
100%
100%
Slices pattern and devtools middleware integration
StateCreator explicit typing
0%
100%
Combined type as first generic
0%
100%
Double parentheses on create
0%
100%
devtools import path
0%
100%
Named actions in devtools
0%
100%
devtools wraps persist
0%
100%
Three separate slice creators
0%
100%
Spread slices in create
0%
100%
Immutable updates in slices
0%
100%
NOTES.md middleware order explanation
100%
100%
fa91c34
Table of Contents
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.