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
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
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.