zustand-mutative-pattern
CommunityEnforce safe, scoped Zustand updates.
Software Engineering#state management#zustand#react context#zustand-mutative#bounded stores#actions namespace
Authorwenerme
Version1.0.0
Installs0
System Documentation
What problem does it solve?
This Skill prevents brittle and unsafe Zustand state management by enforcing a specific architecture for context-scoped stores, namespaced actions, and deep mutative updates.
Core Features & Use Cases
- Actions namespace enforcement: All state modifications must be grouped under an
actionsobject rather than being scattered across root state. - Context isolation for SSR safety: Stores must be provided via React Context (no global singleton Zustand stores).
- Deep mutative updates: Uses
mutativefromzustand-mutativeto update nested state without unsafe spreads. - Performance-friendly selectors: Requires
useShallowwhen selecting multiple properties together. - Side-effect separation: Store emits events; UI/network/toasts/dialogs belong in Sidecar components, not in the store.
Quick Start
Use the zustand-mutative-pattern skill to implement a context-scoped Zustand store that updates nested UI state using mutative and exposes mutations only through an actions namespace.
Dependency Matrix
Required Modules
None requiredComponents
references
💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: zustand-mutative-pattern Download link: https://github.com/wenerme/ai/archive/main.zip#zustand-mutative-pattern Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.