Redux Toolkit is the standard npm package for writing Redux logic, with store setup helpers, slices, and optional RTK Query for data fetching.
Overview
Redux Toolkit targets common Redux pain points: complicated store setup, many add-on packages, and repetitive boilerplate. It wraps core Redux APIs with defaults and utilities so typical apps need less ceremony.
Included APIs cover configureStore, createAction, createSlice, combineSlices, createListenerMiddleware, createAsyncThunk, and createEntityAdapter. RTK Query ships as an optional addon in the same package for defining API layers, caching, and fetch logic without hand-written request code.
New React apps can start from official Redux Toolkit plus TypeScript templates for Vite or Next.js with-redux. React Native has an official Redux+TS Expo template. The package runs in Node or the browser via a module bundler, with a precompiled ESM build documented for no-bundler usage.
Key features
- configureStore with sensible defaults
- createSlice for reducers and actions
- RTK Query data fetching addon
- createAsyncThunk for promises
- createEntityAdapter for normalized data
- createListenerMiddleware
- Redux DevTools enabled by default
- Official Vite and Next.js starters
Use cases
- New React apps with Redux state
- Cached API data with RTK Query
- Reducing Redux boilerplate
- React Native apps with Expo template
- Listener effects on dispatched actions