zustand-state-management
Installation
Summary
Type-safe global state management for React with persist, devtools, and Next.js SSR support.
- Supports TypeScript with double-parentheses syntax (
create<T>()()), persist middleware for localStorage, and Redux DevTools integration - Prevents 6 documented errors including hydration mismatches, infinite render loops, and persist race conditions (fixed in v5.0.10+)
- Includes slices pattern for modular stores, vanilla store creation without React, and immer middleware for mutable-style updates
- Handles Next.js SSR with
_hasHydratedflag pattern and experimentalunstable_ssrSafemiddleware to avoid client-server state mismatches
SKILL.md
Zustand State Management
Last Updated: 2026-01-21 Latest Version: zustand@5.0.10 (released 2026-01-12) Dependencies: React 18-19, TypeScript 5+
Quick Start
npm install zustand
TypeScript Store (CRITICAL: use create<T>()() double parentheses):
import { create } from 'zustand'
interface BearStore {
Related skills
More from jezweb/claude-skills
tailwind-v4-shadcn
|
2.7Ktanstack-query
|
2.5Kshadcn-ui
Install and configure shadcn/ui components for React projects. Guides component selection, installation order, dependency management, customisation with semantic tokens, and common UI recipes (forms, data tables, navigation, modals). Use after tailwind-theme-builder has set up the theme infrastructure, when adding components, building forms, creating data tables, or setting up navigation.
2.5Ktailwind-theme-builder
>
2.2Kfastapi
|
2.0Kcolor-palette
>
1.9K