πͺ
Redux Toolkit (RTK)
Intermediate β AdvancedThe official, opinionated toolset for Redux β built-in Immer, createAsyncThunk, and RTK Query
Redux Toolkit vs Redux
RTK is the modern way to write Redux. It eliminates boilerplate: no separate action creators, no switch statements, Immer built-in for mutable syntax. Install:npm i @reduxjs/toolkit react-reduxconfigureStore & createSlice β The Foundation
intermediateconfigureStore sets up Redux with DevTools + middleware. createSlice automatically generates action creators and action types from reducers.
createAsyncThunk β Async Actions
intermediateHandle async operations (API calls) with built-in pending/fulfilled/rejected lifecycle. Works with extraReducers in your slice.
createSelector β Memoized Selectors
advancedcreateSelector from reselect creates memoized selectors that only recompute when inputs change. Essential for derived state and performance.
Redux Toolkit β Entity Adapter & RTK Query
advancedcreateEntityAdapter normalizes state shape for CRUD operations. RTK Query is a powerful data fetching and caching solution built into Redux Toolkit.