redux-toolkit
by
reduxjs

Description: The official, opinionated, batteries-included toolset for efficient Redux development

View on GitHub ↗

Summary Information

Updated 38 minutes ago
Added to GitGenius on April 7th, 2021
Created on March 3rd, 2018
Open Issues & Pull Requests: 268 (+1)
Number of forks: 1,276
Total Stargazers: 11,219 (+0)
Total Subscribers: 70 (+0)

Issue Activity (beta)

Open issues: 206
New in 7 days: 1
Closed in 7 days: 0
Avg open age: 788 days
Stale 30+ days: 197
Stale 90+ days: 167

Recent activity

Opened in 7 days: 1
Closed in 7 days: 0
Comments in 7 days: 1
Events in 7 days: 1

Top labels

  • RTK-Query (228)
  • RTKQ-Codegen (94)
  • TypeScript (44)
  • bug (37)
  • docs (32)
  • enhancement (18)
  • question (15)
  • React-Native (12)

Repository Insights (GitGenius)

Median issue/PR response: 3.9 hours
Mean response time: 62.8 days
90th percentile: 192.3 days
Tracked items: 820

Most active contributors

Detailed Description

Redux Toolkit is the official, opinionated toolset for Redux development, written in TypeScript and designed to address common pain points developers encounter when setting up and using Redux. The project was created to solve three specific problems: the complexity of configuring a Redux store, the need to install many additional packages to make Redux functional, and the amount of boilerplate code required for typical Redux implementations. Rather than attempting to solve every possible use case, Redux Toolkit deliberately limits its scope to provide abstractions over the setup process and handle the most common scenarios, following the philosophy of create-react-app.

The core Redux Toolkit package includes several key APIs that simplify Redux development. The configureStore function wraps createStore to provide simplified configuration with sensible defaults, automatically combining slice reducers, integrating supplied middleware, including redux-thunk by default, and enabling Redux DevTools Extension support. The createReducer API allows developers to define action handlers through a lookup table rather than writing switch statements, and it automatically integrates the immer library to enable writing immutable updates using normal mutative code syntax. The createAction function generates action creators from action type strings, while createSlice combines createReducer and createAction into a single API that accepts reducer functions, a slice name, and initial state to automatically generate complete slice reducers with corresponding action creators and types. Additional utilities include createAsyncThunk for handling asynchronous operations with pending, resolved, and rejected action types, createEntityAdapter for managing normalized data, createListenerMiddleware as a lightweight alternative to sagas and observables, and combineSlices for combining multiple slices with lazy loading support. The package also re-exports createSelector from the Reselect library for convenience.

RTK Query is an optional addon included within the Redux Toolkit package that addresses data fetching and caching. It provides a compact but powerful toolset for defining API interface layers, eliminating the need to hand-write data fetching and caching logic. RTK Query includes createApi as its core functionality for defining endpoints and configuring data retrieval, fetchBaseQuery as a simplified wrapper around fetch, an ApiProvider component for use without an existing Redux store, and setupListeners for enabling refetch behaviors on mount and reconnection.

According to GitGenius activity tracking, the repository shows strong engagement with a median issue and pull request response latency of 4 hours across 819 tracked items. The most active issue labels are RTK-Query with 228 items, RTKQ-Codegen with 94 items, and TypeScript with 44 items, reflecting the project's focus on query functionality and type safety. The core maintainers include markerikson with 1457 tracked events, aryaemami59 with 453 events, and EskiMojo14 with 294 events. The project shares contributors with microsoft/typescript, microsoft/vscode, and mui/material-ui, indicating its integration into the broader JavaScript ecosystem. Redux Toolkit is available on NPM and includes a precompiled ESM build for direct browser usage via script tags, with official templates available for Vite and Next.js projects.

redux-toolkit
by
reduxjsreduxjs/redux-toolkit

Repository Details

Fetching additional details & charts...