Loading skill
Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Creates Zustand stores in TypeScript with subscribeWithSelector middleware and separated state and action types.
59% 100%+41 ptsof test cases passed
Passed 22 of 22 test cases with the skill, and 13 of 22 without it.
3 of 3 safety checks passed
Not used yet
import { create } from 'zustand';
import { subscribeWithSelector } from 'zustand/middleware';
// ============================================================================
// Types
// ============================================================================
/**
* {{StoreName}}State - The state shape for this store
*/
export interface {{StoreName}}State {
// Add state properties
items: unknown[];
selectedId: string | null;
isLoading: boolean;
error: string | null;
}
/**
* {{StoreName}}Actions - Actions that can be performed on this store
*/
export interface {{StoreName}}Actions {
// Setters
setItems: (items: unknown[]) => void;
setSelectedId: (id: string | null) => void;
setLoading: (loading: boolean) => void;
setError: (error: string | null) => void;
// Complex actions
loadItems: () => Promise<void>;
addItem: (item: unknown) => void;
removeItem: (id: string) => void;
// Reset
reset: () => void;
}
/**
* {{StoreName}}Store - Combined store type
*/Published skills whose descriptions closely match this one, with their benchmark result.
Skills that do similar work, with their benchmark result.
Next to this one in the catalogue, plus popular skills in the same category.