toolcacheAI Coding Prompts › State Management Architecture

State Management Architecture

Design a state management architecture for a [REACT / VUE / SVELTE] application.

App complexity: [SIMPLE / MEDIUM / COMPLEX]
Key features: [LIST MAIN FEATURES]
Provide:
1. **State Categories**: Local UI state, server state, global app state, URL state
2. **Tool Selection**: For each category, recommend the right tool (useState, React Query, Zustand, URL params, etc.) with reasoning
3. **Store Structure**: Directory layout and file organization
4. **Data Flow**: How data moves through the app (diagram description)
5. **Server State**: Caching, invalidation, optimistic updates with React Query/SWR
6. **Global State**: Store definition with TypeScript types
7. **Selectors**: Derived state and memoization patterns
8. **Persistence**: What to persist to localStorage and how
9. **DevTools**: Setup for debugging state changes
10. **Code Examples**: Complete implementation for 2 key features
🔒

Unlock this prompt

You have 5 free unlocks remaining

or
Get unlimited access from £2.99 →

How to use this prompt

Copy the prompt above and paste it into ChatGPT, Claude, Gemini, or any AI assistant. Replace the bracketed placeholders with your specific details.

Leave a Review

Tried this prompt? Let us know how it worked — your reviews help other users find the best prompts.

Get Unlimited Access →Browse All 2,400 Prompts