Zustand is the state management library you reach for when Redux feels like overkill. No providers, no boilerplate, just a `create()` function that returns a hook. The skill covers selector patterns to avoid unnecessary rerenders, `useShallow` for grabbing multiple values efficiently, and the non-React API for accessing state outside components. Two security gates matter here: the persist middleware can leak secrets to localStorage if you're not careful with what gets serialized, and devtools should be gated to development unless you have a reason. It's genuinely minimal but handles the full scope from vanilla JS stores to React integration.

skills.sh installs
258
GitHub stars
87
last updated
Aug 21, 2026

Install

$ npx -y skills add existential-birds/beagle --skill zustand-state --agent claude-code

Installs into .claude/skills of the current project.

Files

Zustand State Management

Minimal state management - no providers, minimal boilerplate.

Quick Reference

import { create } from 'zustand'

interface BearState {
  bears: number
  increase: (by: number) => void
}

const useBearStore = create<BearState>()((set) => ({
  bears: 0,
  increase: (by) => set((state) => ({ bears: state.bears + by })),
}))

// In component - select only what you need
const bears = useBearStore((state) => state.bears)
const increase = useBearStore((state) => state.increase)

State Updates

// Flat updates (auto-merged at one level)
set({ bears: 5 })
set((state) => ({ bears: state.bears + 1 }))

// Nested objects (manual spread required)
set((state) => ({
  nested: { ...state.nested, count: state.nested.count + 1 }
}))

// Replace entire state (no merge)
set({ bears: 0 }, true)

Selectors & Performance

// Good - subscribes only to bears
const bears = useBearStore((state) => state.bears)

// Bad - rerenders on any change
const state = useBearStore()

// Multiple values with useShallow (prevents rerenders with shallow comparison)
import { useShallow } from 'zustand/react/shallow'

Sponsors

Details

Repository
github.com/existential-birds/beagle
Categories
Frontend Development, Backend & APIs
First seen
Jun 3, 2026

More from existential-birds/beagle

All 40
1pproenca avatarrails-application-ui-blockspproenca/dot-skillsCompose new Rails backend pages and refactor existing Rails UI to use premium blocks from templates/application-ui. Use when requests mention ERB views, Rails p251skills.sh installs
2rightnow-ai avatarcss-expertrightnow-ai/openfangCSS expert for flexbox, grid, animations, responsive design, and modern layout techniques230skills.sh installs
3jmerta avatarui-ux-pro-maxjmerta/codex-skillsUse when designing, building, or refining frontend UI/UX: layouts, components, visual systems, typography, color, and UX patterns for websites, landing pages, d229skills.sh installs
4yonatangross avatarreact-server-components-frameworkyonatangross/orchestkitUse when building Next.js 16+ apps with React Server Components. Covers App Router, Cache Components (replacing experimental_ppr), streaming SSR, Server Actions227skills.sh installs
5vercel-labs avatarjson-render-shadcnvercel-labs/json-renderPre-built shadcn/ui components for json-render. Use when working with @json-render/shadcn, adding standard UI components to a catalog, or building web UIs with 213skills.sh installs
6borghei avatarui-design-systemborghei/claude-skillsUI design system toolkit covering design tokens, component documentation, responsive calculations, and developer handoff. Use for creating design systems, maint209skills.sh installs