{"schemaVersion":"1.0","record":{"label":"Redux Toolkit","description":"MIT-licensed toolkit for Redux store setup, slice reducers, asynchronous actions and optional RTK Query data caching.","aliases":["RTK","@reduxjs/toolkit"],"kind":"software","website":"https://redux.js.org/toolkit","overview":"Redux Toolkit is the standard toolkit for writing Redux state logic. It supplies store configuration, slice and action helpers and asynchronous-action utilities, with optional RTK Query entry points for server-data fetching. React applications use separate React Redux bindings. It provides structure for shared state rather than eliminating the need to decide what belongs in a store.","license":"MIT","lifecycle":"active","example":false,"features":[{"name":"Store and slice construction","status":"supported","detail":"configureStore and createSlice reduce manual Redux setup and action/reducer boilerplate.","useCase":"Structured shared application state and action-based updates","platforms":["JavaScript/TypeScript applications","React through React Redux bindings"],"region":"Version, build and integration requirements apply","evidence":[{"url":"https://redux.js.org/toolkit/introduction/getting-started","locator":"Store/slice helpers, React bindings and RTK Query separation","retrievedAt":"2026-10-07T23:17:02Z","kind":"vendor"}]},{"name":"Draft-style reducer updates","status":"supported","detail":"Immer-backed reducers allow draft changes, but cannot both mutate a draft and return a replacement in the same case.","useCase":"Structured shared application state and action-based updates","platforms":["JavaScript/TypeScript applications","React through React Redux bindings"],"region":"Version, build and integration requirements apply","evidence":[{"url":"https://redux.js.org/toolkit/usage/immer-reducers","locator":"Draft mutation versus returned state and replacement pitfalls","retrievedAt":"2026-10-07T23:17:51Z","kind":"vendor"}]},{"name":"Async result actions","status":"supported","detail":"createAsyncThunk emits lifecycle actions; the dispatch promise resolves to an action, with unwrap available for payload/error handling.","useCase":"Structured shared application state and action-based updates","platforms":["JavaScript/TypeScript applications","React through React Redux bindings"],"region":"Version, build and integration requirements apply","evidence":[{"url":"https://redux.js.org/toolkit/api/createAsyncThunk","locator":"Resolved result actions, unwrap and rejectWithValue","retrievedAt":"2026-10-07T23:18:05Z","kind":"vendor"}]},{"name":"Non-serializable state diagnostics","status":"supported","detail":"Middleware logs detected values and permits configurable checks; it does not convert arbitrary data into serialized form.","useCase":"Structured shared application state and action-based updates","platforms":["JavaScript/TypeScript applications","React through React Redux bindings"],"region":"Version, build and integration requirements apply","evidence":[{"url":"https://redux.js.org/toolkit/api/serializabilityMiddleware","locator":"Console diagnostics and configurable serializable checks","retrievedAt":"2026-10-07T23:18:21Z","kind":"vendor"}]},{"name":"SSR-safe global singleton store","status":"unsupported","detail":"The Next.js App Router guide requires stores per request and excludes RSC store reads/writes.","useCase":"Structured shared application state and action-based updates","platforms":["JavaScript/TypeScript applications","React through React Redux bindings"],"region":"Version, build and integration requirements apply","evidence":[{"url":"https://redux.js.org/usage/nextjs","locator":"Per-request stores, hydration and RSC limitations","retrievedAt":"2026-10-07T23:17:41Z","kind":"vendor"}]}],"alternatives":[],"slug":"redux-toolkit","draftAlternatives":[{"targetSlug":"zustand","status":"limited","detail":"Can replace Zustand for shared application state using Redux actions, slice reducers and React Redux subscriptions. Existing store actions and selectors need adaptation; the additional architecture is a tradeoff, not demonstrated universal superiority.","useCase":"Structured shared application state and action-based updates","platforms":["JavaScript/TypeScript applications","React through React Redux bindings"],"region":"Version, build and integration requirements apply","evidence":[{"url":"https://redux.js.org/toolkit/introduction/getting-started","locator":"Store/slice helpers, React bindings and RTK Query separation","retrievedAt":"2026-10-07T23:17:02Z","kind":"vendor"},{"url":"https://redux.js.org/toolkit/usage/immer-reducers","locator":"Draft mutation versus returned state and replacement pitfalls","retrievedAt":"2026-10-07T23:17:51Z","kind":"vendor"},{"url":"https://github.com/pmndrs/zustand/blob/main/README.md","locator":"Hook-based stores and selected subscriptions","retrievedAt":"2026-10-07T23:17:14Z","kind":"vendor"}]}],"evidence":[{"url":"https://github.com/reduxjs/redux-toolkit/blob/master/LICENSE","locator":"MIT conditions","retrievedAt":"2026-10-07T23:17:41Z","kind":"vendor"},{"url":"https://redux.js.org/toolkit/introduction/getting-started","locator":"Store/slice helpers, React bindings and RTK Query separation","retrievedAt":"2026-10-07T23:17:02Z","kind":"vendor"},{"url":"https://redux.js.org/toolkit/usage/immer-reducers","locator":"Draft mutation versus returned state and replacement pitfalls","retrievedAt":"2026-10-07T23:17:51Z","kind":"vendor"},{"url":"https://redux.js.org/toolkit/api/createAsyncThunk","locator":"Resolved result actions, unwrap and rejectWithValue","retrievedAt":"2026-10-07T23:18:05Z","kind":"vendor"},{"url":"https://redux.js.org/toolkit/api/serializabilityMiddleware","locator":"Console diagnostics and configurable serializable checks","retrievedAt":"2026-10-07T23:18:21Z","kind":"vendor"},{"url":"https://redux.js.org/usage/nextjs","locator":"Per-request stores, hydration and RSC limitations","retrievedAt":"2026-10-07T23:17:41Z","kind":"vendor"},{"url":"https://github.com/pmndrs/zustand/blob/main/README.md","locator":"Hook-based stores and selected subscriptions","retrievedAt":"2026-10-07T23:17:14Z","kind":"vendor"}],"document":{"version":1,"references":[{"url":"https://github.com/reduxjs/redux-toolkit/blob/master/LICENSE","locator":"MIT conditions","retrievedAt":"2026-10-07T23:17:41Z","id":"license","title":"Redux Toolkit license","kind":"vendor"},{"url":"https://redux.js.org/toolkit/introduction/getting-started","locator":"Store/slice helpers, React bindings and RTK Query separation","retrievedAt":"2026-10-07T23:17:02Z","id":"overview","title":"Redux Toolkit getting started","kind":"vendor"},{"url":"https://redux.js.org/toolkit/usage/immer-reducers","locator":"Draft mutation versus returned state and replacement pitfalls","retrievedAt":"2026-10-07T23:17:51Z","id":"immer","title":"Redux Toolkit Immer reducers","kind":"vendor"},{"url":"https://redux.js.org/toolkit/api/createAsyncThunk","locator":"Resolved result actions, unwrap and rejectWithValue","retrievedAt":"2026-10-07T23:18:05Z","id":"thunk","title":"createAsyncThunk reference","kind":"vendor"},{"url":"https://redux.js.org/toolkit/api/serializabilityMiddleware","locator":"Console diagnostics and configurable serializable checks","retrievedAt":"2026-10-07T23:18:21Z","id":"serial","title":"Serializability middleware","kind":"vendor"},{"url":"https://redux.js.org/usage/nextjs","locator":"Per-request stores, hydration and RSC limitations","retrievedAt":"2026-10-07T23:17:41Z","id":"next","title":"Redux with Next.js","kind":"vendor"},{"url":"https://github.com/pmndrs/zustand/blob/main/README.md","locator":"Hook-based stores and selected subscriptions","retrievedAt":"2026-10-07T23:17:14Z","id":"zustand","title":"Zustand overview","kind":"vendor"}],"overviewCitations":["overview"],"licenseCitations":["license"],"sections":[{"id":"organization","heading":"Organizing state changes","paragraphs":[{"id":"organization-detail","content":[{"text":"configureStore supplies a common store setup, while createSlice groups state with reducer functions and generates corresponding action creators. React Redux supplies the React binding layer separately. This organization can make generated state transitions easier to review as explicit actions, but it also introduces conventions that an application must follow. The toolkit is not a requirement to put every local input or temporary UI value into global state."}],"citations":["overview","next"]}]},{"id":"immutable","heading":"What draft-style reducer code means","paragraphs":[{"id":"immutable-detail","content":[{"text":"The reducer helpers use Immer so that draft changes can produce immutable results. A case reducer must either modify its draft or return a replacement, not do both. Assigning a new object to the local state variable alone does not replace the stored state; it must be returned. Mutation-looking code outside the Immer-managed context has different semantics. These boundaries matter when adapting generated snippets or extracting reusable reducer functions."}],"citations":["immer"]}]},{"id":"async","heading":"A resolved dispatch is not necessarily success","paragraphs":[{"id":"async-detail","content":[{"text":"createAsyncThunk produces pending, fulfilled and rejected actions. Its dispatch promise resolves with the resulting action even when the underlying operation failed. Callers that need normal payload-or-error behavior can use unwrap, while rejectWithValue carries an application-specific rejected payload. A generated success notification attached only to promise resolution can therefore misreport a failed operation unless the action result is interpreted correctly."}],"citations":["thunk"]}]},{"id":"diagnostics","heading":"Serializability checking is diagnostic","paragraphs":[{"id":"diagnostics-detail","content":[{"text":"The serializability middleware detects problematic values in state or actions and logs them to the console. Its checks and ignored paths can be configured, and its plain-value logic does not accept Date or Map instances by default. This is a development diagnostic, not automatic serialization, encryption or persistence. Suppressing a warning does not itself supply a data-conversion strategy."}],"citations":["serial"]}]},{"id":"server-data","heading":"Optional server-state functionality","paragraphs":[{"id":"server-data-detail","content":[{"text":"RTK Query is included through separate entry points and handles API-oriented fetching and caching. It is optional rather than an automatic consequence of defining slices or using createAsyncThunk. That distinction matters when comparing Redux Toolkit with a compact client-state store: replacing local state management and replacing a server-data cache are related but separate tasks."}],"citations":["overview"]}]},{"id":"nextjs","heading":"Request isolation in server-rendered applications","paragraphs":[{"id":"nextjs-detail","content":[{"text":"The Next.js App Router guide requires per-request store creation, matching hydration data and deliberate handling of route-specific state. It says React Server Components should not read or write the Redux store. The same guide distinguishes this from a client-only SPA, where a global singleton is a different situation. Copying a simple client example into server code without revisiting scope risks mixing request data."}],"citations":["next"]}]},{"id":"fit","heading":"License and substitution","paragraphs":[{"id":"fit-detail","content":[{"text":"Redux Toolkit is MIT-licensed. It can replace "},{"text":"Zustand","targetSlug":"zustand"},{"text":" for appropriate shared-state workflows when the project adopts its actions, reducers and subscription integration. A migration must preserve update semantics and request isolation rather than simply rename dependencies. No benchmark, installation or application migration was performed for this article."}],"citations":["license","overview","zustand"]}]}]},"id":"Q141","revision":125,"updatedAt":"2026-10-10T06:51:14Z","sourceUrl":"https://substitutefor.net/entities/Q141?revision=125"}}