{"enrichment":{"faq":[{"a":"Zustand is a minimal state manager for React built on useSyncExternalStore, offering type-safe stores and atomic selectors to prevent unnecessary re-renders. It provides a lightweight alternative to Redux or Context API with composable middleware like persist and devtools, keeping bundle size lean while handling global application state with minimal overhead.","q":"What is Zustand state management?"},{"a":"Zustand store setup involves creating a store using create() and defining state, getters, and actions. You define your state shape and methods in a single function, then export the hook. Zustand automatically generates a React hook that components can use to access and update state, with built-in support for TypeScript and atomic selectors.","q":"How do I set up a Zustand store?"},{"a":"Zustand vs Redux: Zustand is significantly lighter, requiring no boilerplate for actions, reducers, or providers. It uses React hooks directly instead of connect() or selectors, offers automatic re-render optimization through atomic selectors, and integrates middleware like persist and devtools without Redux DevTools Protocol complexity. Zustand is ideal when you need global state without Redux's overhead.","q":"How does Zustand compare to Redux?"},{"a":"Yes, Zustand persist state functionality is built-in via middleware. The persist middleware automatically saves your store to localStorage (or custom storage) and rehydrates it on app load. You can configure storage engine, version migrations, and which parts of state to persist, making it simple to maintain user preferences and session data.","q":"Can Zustand persist state across browser sessions?"},{"a":"Zustand middleware includes persist for localStorage sync, immer for immutable updates, and devtools for debugging. The devtools middleware integrates with browser Redux DevTools extension, letting you inspect state changes, time-travel debug, and replay actions. Middleware is composable, so you can combine multiple enhancements on a single store.","q":"What middleware and devtools does Zustand support?"},{"a":"Zustand subscribe to changes using the store's subscribe() method directly or via hooks in components. Components automatically re-render only when their selected slice changes, thanks to atomic selectors. You can also use getState() to read current state synchronously or listen() for external subscriptions outside React.","q":"How do I subscribe to state changes in Zustand?"}],"shadow_tags":["state-container","react-ecosystem","minimal-boilerplate","subscription-model","immutability-first"],"summary_rewrite":"Zustand is a minimal state manager for React built on useSyncExternalStore, offering type-safe stores, atomic selectors to prevent unnecessary re-renders, and composable middleware like persist and devtools. It handles client-side global state, persistent preferences, and multi-domain stores while keeping bundle size lean."},"gist":{"api_url":"https://skillfed.io/api/skills/oakoss/agent-skills/zustand.json","as_of":"2026-03-02","description":"Zustand manages global application state in React with a lightweight. 13 stars \u00b7 updated Mar 2026. npx skillfed install oakoss/agent-skills/zustand","install":{"manual":["git clone https://github.com/oakoss/agent-skills","cp -r agent-skills ~/.claude/skills/zustand"],"primary":"npx skillfed install oakoss/agent-skills/zustand","version":"b3244be9"},"kind":"skill","mirror_url":"https://skillfed.io/oakoss/agent-skills/zustand.md","similar":[{"id":"yonatangross/orchestkit/zustand-patterns","name":"zustand-patterns","publisher":"yonatangross/orchestkit","url":"https://skillfed.io/yonatangross/orchestkit/zustand-patterns"},{"id":"secondsky/claude-skills/zustand-state-management","name":"zustand-state-management","publisher":"secondsky/claude-skills","url":"https://skillfed.io/secondsky/claude-skills/zustand-state-management"},{"id":"existential-birds/beagle/zustand-state","name":"zustand-state","publisher":"existential-birds/beagle","url":"https://skillfed.io/existential-birds/beagle/zustand-state"},{"id":"prowler-cloud/prowler/zustand-5","name":"zustand-5","publisher":"prowler-cloud/prowler","url":"https://skillfed.io/prowler-cloud/prowler/zustand-5"},{"id":"Gentleman-Programming/Gentleman-Skills/zustand-5","name":"zustand-5","publisher":"Gentleman-Programming/Gentleman-Skills","url":"https://skillfed.io/Gentleman-Programming/Gentleman-Skills/zustand-5"}],"title":"Zustand by oakoss: Set up and manage global application state with minimal overhead \u2014 SkillFed","use":{"when":["Zustand store setup involves creating a store using create() and defining state, getters, and actions.","Zustand vs Redux: Zustand is significantly lighter, requiring no boilerplate for actions, reducers, or providers."]},"what":{"lead":"Zustand manages global application state in React with a lightweight, TypeScript-first API and composable middleware.","rest":"Zustand is a minimal state manager for React built on useSyncExternalStore, offering type-safe stores, atomic selectors to prevent unnecessary re-renders, and composable middleware like persist and devtools. It handles client-side global state, persistent preferences, and multi-domain stores while keeping bundle size lean."}},"id":"oakoss/agent-skills/zustand","install":{"mode":"external","repo":"https://github.com/oakoss/agent-skills"},"links":{"html":"https://skillfed.io/oakoss/agent-skills/zustand","md":"https://skillfed.io/oakoss/agent-skills/zustand.md","repo":"https://github.com/oakoss/agent-skills"},"meta":{"agents_supported":[],"first_seen":"2026-07-28","forks":5,"language":"Python","last_updated":"2026-03-02","license":null,"name":"Zustand","publisher":"oakoss","stars":13},"relations":{"similar":[{"id":"yonatangross/orchestkit/zustand-patterns"},{"id":"secondsky/claude-skills/zustand-state-management"},{"id":"existential-birds/beagle/zustand-state"},{"id":"prowler-cloud/prowler/zustand-5"},{"id":"Gentleman-Programming/Gentleman-Skills/zustand-5"},{"id":"patricio0312rev/skills/zustand-state-builder"},{"id":"bobmatnyc/claude-mpm-skills/zustand"},{"id":"pproenca/dot-skills/zustand"},{"id":"jmsktm/claude-settings/state-management"},{"id":"Mindrally/skills/zustand-state-management"}]},"slug":{"owner":"oakoss","repo":"agent-skills","skill":"zustand"},"version":"b3244be9"}
