
Zustand Store Ts
This generates Zustand stores with TypeScript following a specific pattern: state and actions separated into distinct interfaces, subscribeWithSelector middleware by default, and individual selectors to avoid unnecessary re-renders. You get a template with placeholders for store names and descriptions, plus guidance on subscribing outside React components. It's opinionated about structure, which is helpful if you want consistency across stores but might feel restrictive if your team already has different conventions. The integration steps assume a specific folder structure under src/frontend/src/store, so it's clearly built for a particular project setup rather than general use.
- skills.sh installs
- 254
- GitHub stars
- 39.4K
- last updated
- Jun 3, 2026
Install
$ npx -y skills add sickn33/antigravity-awesome-skills --skill zustand-store-ts --agent claude-codeInstalls into .claude/skills of the current project.
Files
Zustand Store
Create Zustand stores following established patterns with proper TypeScript types and middleware.
Quick Start
No assets/template.ts is bundled. Adapt the inline examples to the installed Zustand version and actual project types; these are fragments, not a complete application.
Use subscribeWithSelector for selector subscriptions
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
Sponsors
Details
- Repository
- github.com/sickn33/antigravity-awesome-skills
- Category
- Frontend Development
- First seen
- Jun 3, 2026
More from sickn33/antigravity-awesome-skills
All 708- Dependency Upgrade252
- Payment Integration252
- Git Pr Workflows Onboard251
- Posix Shell Pro250
- Startup Metrics Framework249
- C4 Component246
- C4 Container246
- Gdpr Data Handling245
- Terraform Skill245
- Performance Testing Review Ai Review244
- Secrets Management243
- Security Requirement Extraction243
- Airtable Automation242
- C4 Code242
- Changelog Automation242
- Ssh Penetration Testing242
- Git Pr Workflows Pr Enhance241
- K8s Manifest Generator241
- Rust Async Patterns241
- Whatsapp Automation241
- Conductor Revert240
- Gitops Workflow239
- Multi Platform Apps Multi Platform239
- Binary Analysis Patterns238