Zustand preview
zustand

Zustand

Lightweight React state management with hooks

57.8k|stable|v5.0.12
import { create } from 'zustand' const useBearStore = create((set) => ({ bears: 0, increasePopulation: () => set((state) => ({ bears: state.bears + 1 })), }))
Hook-based API — Consume state directly in components without context providers.
Selector optimization — Components re-render only when selected state changes.
Concurrency handling — Handles zombie child problem and React concurrent rendering edge cases.
Async actions — Built-in support for asynchronous state updates.
Middleware system — Extend functionality with middleware like subscribeWithSelector.
Zustand is a minimal state management library that replaces Redux boilerplate with a straightforward hook-based API. It handles React's concurrent rendering pitfalls out of the box and doesn't require context providers, making it a solid choice if you want state management without the framework overhead.
Source on GitHub
pavilion