github.com/reduxjs/redux-toolkit ↗
The official, opinionated, batteries-included toolset for efficient Redux development
Open this visualization on its own page →
Contributors
113
Lines of Code
1,140
From
2018-03-03
To
2021-02-17
About reduxjs/redux-toolkit
Redux Toolkit is the official, opinionated toolset for Redux development that aims to simplify state management in JavaScript applications. It addresses common criticisms of Redux by providing utilities that eliminate boilerplate, simplify store configuration, and reduce the number of dependencies needed to get started. The package includes core APIs like configureStore for simplified store setup, createSlice for combining reducers and actions, createAsyncThunk for handling async operations, and createEntityAdapter for managing normalized data, among others. It also incorporates the immer library to enable writing immutable updates with intuitive mutative syntax.
RTK Query is an optional, built-in addon that specializes in solving data fetching and caching challenges. Rather than hand-writing data fetching logic, developers can define API endpoints using createApi and fetchBaseQuery, gaining automatic request management, caching, refetching behaviors, and integration with Redux DevTools. The entire toolkit is written in TypeScript and is designed to work seamlessly with React, React Native, Next.js, and other JavaScript frameworks, with official templates available for Vite and Next.js projects.
The scope of Redux Toolkit is deliberately focused on the core problem of store configuration and common use cases, intentionally excluding concerns like folder structures, entity relationship management, and reusable Redux modules. This makes it an excellent starting point for developers new to Redux while remaining powerful enough for complex applications that need robust state management and data fetching solutions.