# Zustand State Management

> Sets up Zustand 5 stores in React with saved state, middleware and fixes for the common v5 render loop crash.

- Page: https://youraiskill.com/skill/terminalskills-zustand
- What it does: Zustand is a small state-management library for React: a store is a hook, components subscribe to slices of it with selectors, and no context provider is needed. Use when a user asks to "add a Zustand store", "share state between components without Redux", "persist state to localStorage", "fix Maximum update depth exceeded after upgrading to Zustand v5", "use Zustand with Next.js", or wants the persist, devtools, immer or subscribeWithSelector middleware. Covers the v5 API: typed stores, useShallow, middleware order, access outside React, and per-request stores.
- Niches: frontend, coding, react
- Licence: Apache-2.0
- Status: Checked: open licence, author credited, passed the YourAISkill safety scan. Can be added to a paid pack.
- Contents: instructions and reference files only (2 files)

To add it, see https://youraiskill.com/guides/how-to-add-a-skill-to-claude
