@reduxjs/toolkit
v2.11.2 MITThe official, opinionated, batteries-included toolset for efficient Redux development
@reduxjs/toolkit Download Trends
@reduxjs/toolkit
About @reduxjs/toolkit
@reduxjs/toolkit is the official, opinionated toolset for streamlined Redux development, aiming to simplify common Redux tasks and reduce boilerplate. It includes utilities like `configureStore` and `createSlice` to help developers manage application state efficiently. Developers choose it for its integrated approach to state management, making Redux easier to learn and use.
When to use
- When creating reducers and actions with `createSlice` to automatically generate action types and creators.
- When setting up a Redux store with `configureStore` to include automatic middleware like Redux Thunk and DevTools integration.
- When performing asynchronous logic with thunks, managed by the `createAsyncThunk` API.
- When needing a consistent pattern for managing normalized state shape.
When NOT to use
- If only simple, local component state is required — React's built-in `useState` or `useReducer` hooks are sufficient.
- If a global state solution is needed but the Redux paradigm feels too complex — consider simpler global state management libraries.
- If minimal bundle size is the absolute top priority and complex state logic is not anticipated — a lighter state management alternative might be more suitable.