Generate a complete Redux Toolkit store with slices, async thunks, and middleware
Create Redux Toolkit store configuration for:
Application Type: {{APPLICATION_TYPE}}
Features/Slices: {{FEATURES}}
API Integration: {{API_TYPE}} (REST/GraphQL)
Persistence: {{PERSISTENCE}} (yes/no)
Generate complete Redux setup:
1. **Store Configuration (store.ts):**
- ConfigureStore setup
- Middleware configuration
- DevTools setup
- Hot module replacement
- Type definitions
2. **Slice Templates:**
- Initial state typing
- Reducer definitions
- Action creators
- Prepare callbacks
- Extra reducers
3. **Async Thunks:**
- CreateAsyncThunk patterns
- Loading states
- Error handling
- Cancellation
- Optimistic updates
4. **RTK Query Setup:**
- API slice definition
- Endpoint definitions
- Cache configuration
- Tag invalidation
- Transformations
5. **Selectors:**
- Memoized selectors
- Parameterized selectors
- Composed selectors
6. **Middleware:**
- Custom middleware template
- Logging middleware
- Error tracking middleware
- Analytics middleware
7. **Persistence (if needed):**
- Redux persist configuration
- Storage configuration
- Whitelist/blacklist
- Migration setup
8. **Testing:**
- Store mock utilities
- Slice test templates
- Integration test patterns
9. **Type Safety:**
- RootState type
- AppDispatch type
- Typed hooks
- Action types
Include migration guide from vanilla Redux.Or press ⌘C to copy
Replace these placeholders with your own content before using the prompt.
[{APPLICATION_TYPE][{FEATURES][{API_TYPE][{PERSISTENCE]