Skillshub zustand

Community Zustand Best Practices

install
source · Clone the upstream repo
git clone https://github.com/ComeOnOliver/skillshub
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/ComeOnOliver/skillshub "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/pproenca/dot-skills/zustand" ~/.claude/skills/comeonoliver-skillshub-zustand && rm -rf "$T"
manifest: skills/pproenca/dot-skills/zustand/SKILL.md
source content

Community Zustand Best Practices

Comprehensive performance and architecture guide for Zustand state management in React applications. Contains 43 rules across 8 categories, prioritized by impact from critical (store architecture, selector optimization) to incremental (advanced patterns).

When to Apply

Reference these guidelines when:

  • Creating new Zustand stores
  • Optimizing re-render performance with selectors
  • Implementing persistence or middleware
  • Integrating Zustand with SSR/Next.js
  • Reviewing code for state management patterns

Rule Categories by Priority

PriorityCategoryImpactPrefix
1Store ArchitectureCRITICAL
store-
2Selector OptimizationCRITICAL
select-
3Re-render PreventionHIGH
render-
4State UpdatesMEDIUM-HIGH
update-
5Middleware ConfigurationMEDIUM
mw-
6SSR and HydrationMEDIUM
ssr-
7TypeScript PatternsLOW-MEDIUM
ts-
8Advanced PatternsLOW
adv-

Quick Reference

1. Store Architecture (CRITICAL)

2. Selector Optimization (CRITICAL)

3. Re-render Prevention (HIGH)

4. State Updates (MEDIUM-HIGH)

5. Middleware Configuration (MEDIUM)

6. SSR and Hydration (MEDIUM)

7. TypeScript Patterns (LOW-MEDIUM)

8. Advanced Patterns (LOW)

How to Use

Read individual reference files for detailed explanations and code examples:

Reference Files

FileDescription
references/_sections.mdCategory definitions and ordering
assets/templates/_template.mdTemplate for new rules
metadata.jsonVersion and reference information