zustand-store

Create Zustand stores with immer, persist, and devtools middleware.

1|Updated Aug 8, 2025
One-click install
npx skills add https://github.com/Intellifill/IntelliFill --skill zustand-store-intellifill
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: zustand-store
Source: https://github.com/Intellifill/IntelliFill/tree/main/.claude/skills/zustand-store
Command: npx skills add https://github.com/Intellifill/IntelliFill --skill zustand-store-intellifill

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill provides a robust pattern for building Zustand stores with immer, persist, and devtools to enforce consistency across frontend state management.

Core Features & Use Cases

  • Consistent store templates for domain data (auth, documents, templates, UI) using Zustand with immer for ergonomic state mutations and devtools for debugging.
  • Middleware stack recommended: immer, persist, and devtools with proper order and migration support, enabling persistent, debuggable state across sessions.
  • Testing and maintenance guidance including async actions, selectors, and derived state to minimize re-renders and improve testability.

Quick Start

Use the zustand-store skill template to scaffold a new domain store in quikadmin-web/src/stores and wire up actions, persistence, and devtools.

Frequently Asked Questions about zustand-store

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I structure Zustand stores with immer and devtools for React state management?▼

Use a typed store template for domain data like auth or documents, enforcing a middleware order of devtools, persist, then immer to standardize Zustand state management across your React application.

What is the correct middleware order when combining Zustand persist and immer?▼

The recommended middleware stack is devtools, persist, then immer. This sequence ensures proper debugging, persistent state across sessions, and ergonomic immutable mutations for your Zustand store.

How do I build testable async CRUD actions in a Zustand store?▼

Define testable async actions for CRUD operations directly within the typed Zustand store template. Using immer for mutations and selectors for derived state ensures actions remain deterministic and minimizes re-renders during testing.

Does this Zustand state management pattern support persistent state across sessions?▼

Yes, the pattern integrates the Zustand persist middleware with migration support to maintain persistent state across sessions, ensuring domain store data like auth or UI state survives page reloads.

When should I use Zustand with immer over other React state management approaches?▼

Use Zustand with immer when your React UI requires domain stores with ergonomic state mutations, persistent state across sessions, and devtools debugging, avoiding the boilerplate of traditional context reducers.