zustand
Installation
SKILL.md
Zustand
Lightweight state management for React. No providers, no boilerplate. Stores are hooks.
Quick start
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 })),
}))