Design and implement Zustand stores with proper typing, middleware, and best practices.
I need help setting up Zustand for state management in my React app. **Application State Needs:** ``` [describe your state structure] ``` **Actions Required:** [List the actions/mutations needed] **Async Operations:** [Describe API calls or async actions] **Persistence:** - LocalStorage: [yes/no] - Session persistence: [yes/no] **Requirements:** - TypeScript: [yes/no] - DevTools integration: [yes/no] - Multiple stores: [yes/no] Please provide: 1. Store definition with TypeScript 2. Actions and selectors 3. Async action patterns 4. Middleware setup (persist, devtools) 5. Store slicing pattern if needed 6. Component usage examples 7. Testing approach
Or press ⌘C to copy