zustand-store-ts▌
sickn33/antigravity-awesome-skills · updated Apr 8, 2026
Create Zustand stores following established patterns with proper TypeScript types and middleware.
Zustand Store
Create Zustand stores following established patterns with proper TypeScript types and middleware.
Quick Start
Copy the template from assets/template.ts and replace placeholders:
{{StoreName}}→ PascalCase store name (e.g.,Project){{description}}→ Brief description for JSDoc
Always Use subscribeWithSelector
import { create } from 'zustand';
import { subscribeWithSelector } from 'zustand/middleware';
export const useMyStore = create<MyStore>()(
subscribeWithSelector((set, get) => ({
// state and actions
}))
);
Separate State and Actions
export interface MyState {
items: Item[];
isLoading: boolean;
}
export interface MyActions {
addItem: (item: Item) => void;
loadItems: () => Promise<void>;
}
export type MyStore = MyState & MyActions;
Use Individual Selectors
// Good - only re-renders when `items` changes
const items = useMyStore((state) => state.items);
// Avoid - re-renders on any state change
const { items, isLoading } = useMyStore();
Subscribe Outside React
useMyStore.subscribe(
(state) => state.selectedId,
(selectedId) => console.log('Selected:', selectedId)
);
Integration Steps
- Create store in
src/frontend/src/store/ - Export from
src/frontend/src/store/index.ts - Add tests in
src/frontend/src/store/*.test.ts
When to Use
This skill is applicable to execute the workflow or actions described in the overview.
Discussion
Product Hunt–style comments (not star reviews)- No comments yet — start the thread.
Ratings
4.6★★★★★32 reviews- ★★★★★Chinedu Diallo· Dec 24, 2024
zustand-store-ts reduced setup friction for our internal harness; good balance of opinion and flexibility.
- ★★★★★Olivia Abbas· Dec 12, 2024
Registry listing for zustand-store-ts matched our evaluation — installs cleanly and behaves as described in the markdown.
- ★★★★★Chaitanya Patil· Dec 8, 2024
zustand-store-ts reduced setup friction for our internal harness; good balance of opinion and flexibility.
- ★★★★★Piyush G· Nov 27, 2024
I recommend zustand-store-ts for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.
- ★★★★★Maya Ghosh· Nov 15, 2024
I recommend zustand-store-ts for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.
- ★★★★★Noah Taylor· Nov 7, 2024
Keeps context tight: zustand-store-ts is the kind of skill you can hand to a new teammate without a long onboarding doc.
- ★★★★★Anaya Haddad· Nov 3, 2024
Useful defaults in zustand-store-ts — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.
- ★★★★★Fatima Abbas· Oct 26, 2024
zustand-store-ts is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.
- ★★★★★William Dixit· Oct 22, 2024
I recommend zustand-store-ts for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.
- ★★★★★Shikha Mishra· Oct 18, 2024
Useful defaults in zustand-store-ts — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.
showing 1-10 of 32