Create Zustand stores with TypeScript, subscribeWithSelector middleware, and proper state/action separation. Use when building React state management, creating global stores, or implementing reactive state patterns with Zustand.
Instrucciones de origen · Vista previa de solo lectura
name
zustand-store-ts
description
Create Zustand stores with TypeScript, subscribeWithSelector middleware, and proper state/action separation. Use when building React state management, creating global stores, or implementing reactive state patterns with Zustand.
license
MIT
metadata
{"author":"Microsoft","version":"1.0.0"}
Zustand Store
Create Zustand stores following established patterns with proper TypeScript types and middleware.
// Good - only re-renders when `items` changesconst items = useMyStore((state) => state.items);
// Avoid - re-renders on any state changeconst { items, isLoading } = useMyStore();