Redux Toolkit Store Configuration

Generate a complete Redux Toolkit store with slices, async thunks, and middleware

6/11/2026
Prompt
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

Variables (4)

Replace these placeholders with your own content before using the prompt.

[{APPLICATION_TYPE][{FEATURES][{API_TYPE][{PERSISTENCE]

Ready to use?

Copy and paste into your favorite AI tool

Test this prompt live

Try it in our AI Playground with Claude

Open Playground

Explore more Coding prompts

Browse Coding

Command Palette

Search for a command to run...