state-management

Enforce Zustand store standards and selector best practices for React applications.

1|Updated Dec 14, 2025
One-click install
npx skills add https://github.com/komluk/scaffolding.template --skill state-management-komluk
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: state-management
Source: https://github.com/komluk/scaffolding.template/tree/main/stacks/react/.claude/skills/state-management
Command: npx skills add https://github.com/komluk/scaffolding.template --skill state-management-komluk

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill provides clear guidelines and best practices for managing application state using Zustand, ensuring consistency, maintainability, and performance across your React projects.

Core Features & Use Cases

  • Zustand Store Standards: Defines conventions for store structure, naming, and design principles.
  • Selector Best Practices: Guides on how to efficiently select and memoize state to prevent unnecessary re-renders.
  • Middleware Usage: Recommends appropriate middleware for persistence, debugging, and complex state updates.
  • Use Case: When building a new feature that requires shared data between multiple components, use this Skill to guide the creation of a new Zustand store, ensuring it follows established patterns for scalability and performance.

Quick Start

Use the state-management skill to create a new Zustand store for managing user authentication data.

Frequently Asked Questions about state-management

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

FAQPage Schema
What is the best way to structure a Zustand store for scalable React applications?

The best way to structure a Zustand store involves following standardized architecture conventions for naming and design, ensuring your React applications maintain a scalable and consistent state solution. This approach prevents fragmented data logic.

How do I prevent unnecessary re-renders when using Zustand for state management?

To prevent unnecessary re-renders in Zustand state management, you should apply selector best practices by efficiently selecting and memoizing state. This ensures components only re-render when the specific data they depend on changes.

When do I need middleware in my Zustand store?

You need middleware in your Zustand store when handling complex state updates that require data persistence, debugging capabilities, or structured asynchronous operations. Integrating appropriate middleware maintains performance and codebase maintainability.

How do I create a new Zustand store for managing shared data across multiple React components?

To create a new Zustand store for shared data, follow established patterns for store architecture and data selection. This ensures the feature integrates efficiently and maintains performance across multiple components.

What are common anti-patterns in frontend state management with Zustand?

Common anti-patterns in frontend Zustand state management include poorly structured stores, inefficient data selection causing re-renders, and inappropriate middleware integration. Defining and avoiding these patterns ensures a maintainable codebase.