State Management with Redux

Redux 3,824 is a single JavaScript object holding the state several parts of your application care about, plus one rule for changing it: you never assign to that object. You dispatch a plain action describing what happened, and a pure reducer returns the next object. Every change therefore has a name, an order and a payload, which is why a Redux application can be replayed, logged, time-travelled and tested without a browser.

That discipline costs boilerplate, and Redux Toolkit 3,824 removes almost all of it. The official package (@reduxjs/toolkit 2.12.0, released 15 May 2026) wraps Redux 5.0.1, Immer 11 28,983 , Reselect 5 19,013 and redux-thunk 3, and is how the Redux team recommends writing Redux today. createStore, applyMiddleware and connect() still work, and you meet them here only so you can read older code.

Installing Redux Toolkit and the React bindingsShell
npm install @reduxjs/toolkit react-redux

react-redux 9.3.0 is the binding layer between the store and your components; you never install redux yourself. It needs React 18 7,897 or 19, because it is built on useSyncExternalStore (useSyncExternalStore).

One dispatch, one pass through the store, one re-render
One dispatch, one pass through the store, one re-render

Subsections