Zustand 5
Zustand 5 store patterns covering stores, selectors, persist, slices, and devtools for client-side state.
- CCM score
- 62 of 100
- skills.sh installs
- 916
- GitHub stars
- 15.3K
- last updated
- Aug 21, 2026
Own this skill? Claim it
What it does
- Covers store setup, selector usage, persist middleware, slices, async actions, devtools, and access outside React
- Includes runnable examples for basic stores,
persistwithcreateJSONStorage-style storage, and a combined user and cart slices store - Enforces
useShallowfor multi-field selectors, since v5 hooks compare withObject.isand skip the equality function - Designed for Prowler UI, where stores live in
ui/store/{feature}/store.tswith tests underui/store/__tests__/
Install
$ npx -y skills add prowler-cloud/prowler --skill zustand-5 -yInstalls into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.
Files
Prowler UI Layout
- Stores live in
ui/store/{feature}/store.ts(some single files, e.g.ui/store/side-panel.ts) and are re-exported fromui/store/index.ts. - Tests:
ui/store/__tests__/*.test.tsor co-locatedstore.test.ts. zustand/middleware(persist,createJSONStorage) is used;immeris NOT installed inui/.
Basic Store
import { create } from "zustand";
interface CounterStore {
count: number;
increment: () => void;
decrement: () => void;
reset: () => void;
}
const useCounterStore = create<CounterStore>((set) => ({
count: 0,
increment: () => set((state) => ({ count: state.count + 1 })),
decrement: () => set((state) => ({ count: state.count - 1 })),
reset: () => set({ count: 0 }),
}));
// Usage - select what you need
function Counter() {
const count = useCounterStore((s) => s.count);
const increment = useCounterStore((s) => s.increment);
const decrement = useCounterStore((s) => s.decrement);
return (
<div>
<span>{count}</span>
<button onClick={increment}>+</button>
<button onClick={decrement}>-</button>
</div>
);
}
Persist Middleware
Details
- Repository
- github.com/prowler-cloud/prowler
- Category
- Frontend & UI Code
- First seen
- Jun 3, 2026
More from prowler-cloud/prowler
All 6Similar to Zustand 5
More Frontend & UI Codezustandpedronauck/skills379 installsFocused Zustand guide that sets store structure, selector hooks, and middleware conventions for client-only shared state.
zustand-patternsyonatangross/orchestkit1.5K installsZustand 5.x state management reference covering slices, middleware, Immer, persistence, and selectors with TypeScript.
zustand-state-managementmindrally/skills1K installsLead-in line for a Zustand best-practices skill covering store design, selectors, middleware, SSR, and testing.
zustand-state-builderpatricio0312rev/skills265 installsModular Zustand store patterns with TypeScript, persistence, devtools, and immer middleware for global state.
zustand-store-tssickn33/agentic-awesome-skills254 installsTyped Zustand store patterns with subscribeWithSelector, split state and actions, and selector-based rendering.
zustand-stateexistential-birds/beagle261 installsMinimal React and vanilla JavaScript state store with selectors, persistence, and devtools support, without Redux boilerplate.