zustand-state-management

Installation
SKILL.md

Zustand State Management

Use this skill for Zustand authoring and review. Start by deciding whether the state should exist in Zustand at all, then choose the smallest store shape, subscription pattern, and middleware stack that solves the problem without introducing avoidable rerenders or framework bugs.

Use This Skill When

  • Building or reviewing Zustand stores in React or vanilla TypeScript code
  • Deciding whether state belongs in local component state, Zustand, or a server-state tool
  • Structuring store state, actions, selectors, slices, and derived values
  • Fixing rerender churn, unstable selector outputs, or stale v4 equality patterns
  • Adding persist, devtools, immer, combine, or subscribeWithSelector
  • Wiring Zustand into Next.js, SSR, or hydration-sensitive apps
  • Modernizing older examples that still rely on zustand/context, selector equality args on create, or other pre-v5 patterns

Out Of Scope

  • Server-state fetching, caching, retries, and invalidation beyond explaining why Zustand is not the right primary tool
  • UI-library-specific component advice beyond the store integration point
  • Generic React performance tuning that is unrelated to Zustand subscriptions
Installs
7
First Seen
Mar 26, 2026
zustand-state-management — mkgp-dev/codex-skills