reduxjs/redux
66.8
Adequate · 28 September 2026
5.1k
lines of production code
TypeScript
with JavaScript
4
measurements over time
What this system is
This system is the core Redux library and its associated documentation site, providing state management utilities for JavaScript applications. It maintains a suite of example projects demonstrating various Redux patterns, including modern React integrations with Redux Toolkit and legacy vanilla implementations. The codebase has been modernized by migrating core modules and tests to TypeScript, replacing legacy build tools with a faster pnpm and Vitest stack, and updating the documentation site to Docusaurus 2.
How it got here
2015–2016 — Modernization and example migration
22 changes.
The project overhauled its build infrastructure by migrating to a modern toolchain and converted core Redux modules to TypeScript while deprecating legacy APIs. Simultaneously, all example applications were restructured to use Create React App and Redux Toolkit, replacing outdated patterns with current best practices and modular code organization.
2018–2019 — TypeScript migration and documentation overhaul
9 changes.
The project underwent a comprehensive migration of its core source code, test suite, and internal utilities from JavaScript to TypeScript to enhance type safety and maintainability. Concurrently, the documentation website was rebuilt using Docusaurus 2, featuring a new design system with dark mode support and improved code readability.
2022–2026 — TypeScript tooling and documentation enhancements
5 changes.
This period focused on modernizing the project's TypeScript infrastructure, including updating build scripts for error minification and sourcemap handling, and migrating website documentation tooling to the oxc ecosystem for TypeScript 7 compatibility. It also involved expanding test coverage with rigorous type tests for core APIs and introducing new interactive documentation components like LiveExample and VideoEmbed.
Features
Add Redux Counter Vanilla example
Added a new standalone example demonstrating the raw Redux API using ES5 and plain DOM manipulation, without requiring a build system or view framework. The example includes an HTML file with embedded scripts for incrementing, decrementing, incrementing if odd, and async incrementing, along with a README explaining its purpose as a minimal, dependency-free introduction to Redux.
examples/counter-vanilla · high confidence
Add TypeScript counter example using Create React App and Redux Toolkit
A new \counter-ts\ example has been added to the \examples/\ directory, providing a starter template bootstrapped with Create React App and the Redux Toolkit TypeScript template. This example demonstrates a counter application featuring synchronous and asynchronous state management via Redux Toolkit slices, typed Redux hooks (\useAppDispatch\, \useAppSelector\), and a mock API for async operations. It includes full project scaffolding such as TypeScript configuration, CSS modules for styling, performance reporting via \web-vitals\, and unit tests for the counter reducer.
examples/counter-ts · high confidence
Added shopping cart action creators
The shopping cart example now includes a new actions module that defines Redux action creators for retrieving products, adding items to the cart with inventory checks, and processing checkout requests.
examples/shopping-cart/src/actions · high confidence
Initialize Redux Todo example with action creators and entry point
The todos example now includes the core action creators (addTodo, setVisibilityFilter, toggleTodo) and a VisibilityFilters constant in src/actions, along with a corresponding test suite to verify action shape. An entry point in src/index.js has been added to bootstrap the React application using Redux's Provider and a store created from the root reducer, wiring the App component into the DOM.
examples/todos/src/actions · high confidence
New LiveExample and VideoEmbed components for interactive and video content
Added LiveExample and VideoEmbed components to the website. LiveExample embeds StackBlitz WebContainers that only boot on user click to prevent browser crashes, with fallbacks for non-Chromium browsers. VideoEmbed handles third-party video players using credentialless iframes where supported, falling back to plain iframes or links as needed.
website/src/components · high confidence
New Node container component for the tree-view example
The tree-view example now includes a new Node container component that manages the display and interaction of individual tree nodes. This component renders a counter, an increment button, and links to add or remove child nodes, connecting these interactions to Redux actions. A corresponding test suite has been added to verify the component's behavior, including counter display, action dispatching on button clicks, and conditional rendering of remove links based on parent presence.
examples/tree-view/src/containers · high confidence
Removals
Removal of legacy CounterStore module
The application no longer includes the CounterStore module, which previously managed a simple counter state by incrementing a value upon receiving an INCREMENT\_COUNTER action. This change removes the store implementation and its export from the stores index, eliminating this specific state management capability from the application.
src/stores · high confidence
Removal of legacy Redux integration modules
The legacy Redux integration files (\connect.js\, \createDispatcher.js\, and \flux.js\) have been removed from the \src/redux\ directory. This deletion eliminates the custom \connect\ higher-order component, the dispatcher implementation, and the context provider wrapper that previously facilitated state management and action binding in this codebase.
src/redux · high confidence
Removal of synchronous counter action creators
The synchronous action creators for the counter feature, previously defined in \src/actions/CounterActions.js\ and re-exported via \src/actions/index.js\, have been removed. This eliminates the \increment\ action and its associated constant, effectively removing the ability to dispatch synchronous counter updates from this module.
src/actions · high confidence
Behavioural changes
Automated example testing and documentation entry point
The examples directory now includes a README that directs users to the main documentation and a testAll.js script that automatically iterates through example subdirectories to run npm ci and npm test. This script ensures consistent build and test execution across all examples, skipping the counter-vanilla example, and sets the SKIP\_PREFLIGHT\_CHECK environment variable to bypass react-scripts preflight checks.
examples · high confidence
Build scripts updated for modern tooling and error minification
The build process now includes a new Babel plugin that minifies error messages in production builds by replacing string literals with numeric indices, reducing bundle size while preserving detailed messages in development. Additionally, a new post-build script strips the 'file' field from generated sourcemaps to prevent bundlers like Next.js/Turbopack from incorrectly resolving source files, and the cleanup script has been updated to use Node's native fs.rmSync instead of rimraf.
scripts · high confidence
Core Redux modules converted to TypeScript with deprecated createStore
The core Redux modules (\createStore\, \combineReducers\, \applyMiddleware\, \bindActionCreators\, \compose\) have been rewritten in TypeScript, introducing stricter type definitions and overloads for better developer experience. The \createStore\ function is now officially deprecated in favor of \@reduxjs/toolkit\'s \configureStore\, with a new \legacy\_createStore\ export provided to bypass the deprecation warning. Additionally, legacy example files (App.js, Counter.js, etc.) have been removed from the source directory.
src · high confidence
Counter example updated to Create React App and Redux Toolkit
The counter example has been replaced with a modern setup bootstrapped using Create React App and Redux Toolkit. Users will now see a React 18 application structure featuring the new \createRoot\ API, a Redux store configured via \configureStore\, and a counter slice utilizing Redux Toolkit's \createSlice\ and \createAsyncThunk\. The example includes updated UI components, CSS modules, and a test suite to demonstrate these current best practices.
examples/counter · high confidence
Customized design tokens and dark mode support for the documentation site
The site's global CSS has been updated to define custom design variables, including a new primary color palette (purple tones) and specific styling for code blocks, blockquotes, and admonitions. A dedicated dark mode theme is now supported, overriding variables for text, backgrounds, and interactive elements to ensure readability and visual consistency in low-light environments. Additionally, responsive adjustments have been made to font sizes and navbar layout behavior across different screen widths.
website/src/css · high confidence
Internal utility functions rewritten in TypeScript
The internal utility modules in src/utils (including actionTypes, formatProdErrorMessage, isAction, isPlainObject, kindOf, symbol-observable, and warning) have been rewritten in TypeScript. This change improves type safety and maintainability of these core helpers without altering their runtime behavior or public API.
src/utils · high confidence
Migrate documentation site to Docusaurus 2 with pnpm and TypeScript configuration
The documentation website has been migrated from the previous static site generator to Docusaurus 2. This change introduces a new build toolchain using pnpm (managed via pnpm-workspace.yaml) and updates the configuration files to TypeScript (docusaurus.config.ts, tsconfig.json). To ensure a seamless user experience during this transition, a comprehensive \_redirects file has been added to map all legacy Gitbook and previous site URLs to their new Docusaurus equivalents, preserving existing links. The site structure is now defined by a new sidebars.js file, organizing content into updated sections like 'Redux Essentials' and 'Redux Fundamentals'.
website · high confidence
Modernized build tooling and developer environment
The project has overhauled its development infrastructure by migrating from Webpack and Babel to a modern stack using pnpm, Vitest, Oxlint, Oxfmt, and tsdown. This change replaces the legacy Webpack configuration and ESLint setup with Oxlint and Oxfmt for faster linting and formatting, and introduces tsdown for building the library bundles. Additionally, the test runner has switched from Jest to Vitest, and the repository now enforces consistent coding styles via new .editorconfig and .gitattributes files, while removing obsolete files like .babelrc and .jshintrc.
(repo-wide) · high confidence
New production error page and updated homepage
The website now includes a dedicated /errors page that lists all Redux production error codes in a table and displays the full error message for a specific code when passed via a URL parameter (e.g., ?code=...). The homepage has been updated to feature a new hero section with 'Get Started' call-to-action, highlights Redux's key benefits (Predictable, Centralized, Debuggable, Flexible), and includes a callout for the new Redux.dev course.
website/src/pages · high confidence
Port tree-view example to Create React App with React 16
The tree-view example has been restructured to use Create React App, replacing the previous setup with a standard React 16 application. This includes a new entry point in index.js that initializes a Redux store and renders the tree, a dedicated module for generating the test data, and configuration for Enzyme testing via setupTests.js to support the React 16 adapter.
examples/tree-view/src · high confidence
Refactor Todos example to use Redux container components
The Todos example has been restructured to follow a clearer separation of concerns by introducing dedicated container components (AddTodo, FilterLink, VisibleTodoList) that use React-Redux's connect function to manage state and dispatch actions. This change replaces previous implementations that likely mixed logic with presentational components, ensuring that filter logic now strictly uses the VisibilityFilters constants instead of raw strings, and that user interactions are handled through explicit action dispatchers within these new container wrappers.
examples/todos/src/containers · high confidence
Refactored Redux reducers into modular, testable units
The Todos example's state management logic has been restructured to improve code organization and maintainability. The \todos\ reducer is now a standalone module that handles \ADD\_TODO\ and \TOGGLE\_TODO\ actions, while the \visibilityFilter\ reducer is separated into its own file, explicitly importing and using the \VisibilityFilters\ constants from the actions module instead of raw strings. These individual reducers are combined in a new \index.js\ file using Redux's \combineReducers\. Additionally, comprehensive unit tests have been added for the \todos\ reducer to verify correct handling of initial state, adding new items, and toggling completion status.
examples/todos/src/reducers · high confidence
Refactored Todo app components to use React functional components with PropTypes
The component files in the examples/todos/src/components directory (App, Footer, Link, Todo, TodoList) have been rewritten as stateless functional components. This change replaces previous class-based or other implementations with a simpler functional style and adds explicit PropTypes validation for component props, improving code clarity and type safety for the example application.
examples/todos/src/components · high confidence
Refactored tree-view example to use modular action and reducer files
The tree-view example has been restructured to separate concerns by introducing dedicated \actions/index.js\ and \reducers/index.js\ modules. This change organizes the Redux logic into explicit action creators (such as \increment\, \createNode\, \deleteNode\, \addChild\, and \removeChild\) and a corresponding reducer that handles state updates for node creation, deletion, and hierarchy management. The refactoring also includes a new test suite (\reducers/index.spec.js\) to verify the correct behavior of these state transitions.
examples/tree-view/src/actions, examples/tree-view/src/reducers · high confidence
Shopping cart and tree-view examples now use Create React App scaffolding
The shopping-cart and tree-view examples have been restructured to use the Create React App project layout. Each example now includes a standard public/index.html entry point, a .gitignore for build artifacts, and an updated README that marks the examples as outdated and directs users to the current Redux Essentials tutorial. This change alters how the examples are initialized and run (via npm start/build) but does not change the underlying Redux logic.
examples/shopping-cart, examples/tree-view · high confidence
Shopping cart example migrated to Create React App structure
The shopping cart example has been restructured to use the Create React App convention, introducing a standard entry point in src/index.js that initializes the Redux store with thunk and logger middleware, and adding src/setupTests.js to configure Enzyme with the React 16 adapter. This change updates the example's runtime behavior and testing setup to align with modern React tooling standards.
examples/shopping-cart/src · high confidence
Shopping cart example now displays product inventory and stock status
The shopping cart example has been updated to reflect product inventory levels. The ProductItem component now reads the 'inventory' property from the product data and passes it as 'quantity' to the Product display component, ensuring the stock count is visible in the list. Additionally, the 'Add to cart' button is now disabled and labeled 'Sold Out' when a product's inventory is zero, providing clear feedback on availability.
examples/shopping-cart/src/components · high confidence
Shopping cart example now uses a modular reducer structure with dedicated selectors
The shopping cart example has been refactored to use a new reducer architecture. The cart logic is now split into separate \cart.js\ and \products.js\ reducers, combined via Redux's \combineReducers\. New selector functions (\getTotal\, \getCartProducts\, \getProduct\, \getVisibleProducts\) are exported from \index.js\ to provide a clean API for accessing state, replacing direct state access. This change improves code organization and testability within the example application.
examples/shopping-cart/src/reducers · high confidence
Todos example migrated to Create React App
The Redux Todos example has been updated to use Create React App, introducing a standard project structure with a new public/index.html entry point and a .gitignore file to exclude build artifacts and dependencies. The README has been updated to indicate that this example demonstrates legacy patterns and directs users to the current Redux Essentials tutorial for recommended practices.
examples/todos · high confidence
Type definitions extracted into dedicated modules
The TypeScript type definitions for actions, reducers, middleware, and the store have been extracted from the main index file into separate modules (src/types/actions.ts, src/types/reducers.ts, src/types/middleware.ts, src/types/store.ts). This refactoring improves code organization and maintainability by grouping related types, while preserving the existing public API surface for consumers.
src/types · high confidence
Updated code syntax highlighting theme for improved readability
The website now uses a new Monokai-based syntax highlighting theme (monokaiTheme.js) for code blocks. This change specifically adjusts the color of comments to '\#c6cad2' to increase contrast against the dark background, improving readability for users viewing code snippets.
website/src/js · high confidence
Website TypeScript codeblock tooling updated for TypeScript 7 and oxfmt
The \remark-typescript-tools\ plugin in the website build has been replaced with a vendored port to support TypeScript 7 and the oxc toolchain. Because TypeScript 7 removed the classic programmatic emit API, the plugin now uses \oxc-transform\ for transpilation and \oxfmt\ for code formatting (replacing the previous Prettier-based approach). This change ensures that TypeScript code blocks in documentation are correctly type-checked and rendered under the new TypeScript version.
website/plugins/remark-typescript-tools · high confidence
Test coverage
Added TypeScript type tests for Redux core APIs; Added unit tests for utility functions; Migrate test helpers to TypeScript; Migrate test suite to TypeScript and Vitest.
Dependencies
Add documentation site and example project dependencies
The \docs\ directory now includes a \package.json\ and \pnpm-lock.yaml\ to manage its own dependencies, introducing Vitest 4.0.5 for testing and MSW 2.0.0 for API mocking within the documentation build. Additionally, new \package.json\ and lock files have been added for the \counter-ts\, \counter\, \counter-vanilla\, \shopping-cart\, \todos\, and \tree-view\ examples, establishing their specific dependency trees (including React 18/17, Redux/RTK, and testing libraries) to ensure they can be installed and run independently.
(dependencies) · high confidence
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
How this codebase got here
Score
- CAI 40 → 67 (+27.1)
- Rubric changed (rubric-2026.08.15 → rubric-2026.09.16) — scores are not directly comparable.
Lenses
- Code Health 81 → 89 (+8.9)
- Architecture 97 (new)
- Maturity 66 → 67 (+1.3)
- Readiness 26 → 56 (+30.1)
- Security 38 → 76 (+37.4)
- Performance 100 (new)
Resolved (67)
- Change coupling: applyMiddleware.ts ↔ compose.ts (src/applyMiddleware.ts)
- Change coupling: applyMiddleware.ts ↔ createStore.ts (src/applyMiddleware.ts)
- Change coupling: bindActionCreators.ts ↔ combineReducers.ts (src/bindActionCreators.ts)
- Change coupling: compose.ts ↔ createStore.ts (src/compose.ts)
- Critical CVE: [GHSA redacted] (yarn.lock)
- Critical CVE: [GHSA redacted] (yarn.lock)
- Dimension evaluation failed
- High CVE: [GHSA redacted] (yarn.lock)
- High CVE: [GHSA redacted] (yarn.lock)
- High CVE: [GHSA redacted] (yarn.lock)
- High CVE: [GHSA redacted] (yarn.lock)
- High CVE: [GHSA redacted] (yarn.lock)
- High CVE: [GHSA redacted] (yarn.lock)
- High CVE: [GHSA redacted] (yarn.lock)
- High CVE: [GHSA redacted] (yarn.lock)
- High CVE: [GHSA redacted] (yarn.lock)
- High CVE: [GHSA redacted] (yarn.lock)
- High CVE: [GHSA redacted] (yarn.lock)
- High CVE: [GHSA redacted] (yarn.lock)
- High CVE: [GHSA redacted] (yarn.lock)
- …and 47 more
New (79)
- Coverage not measured — JavaScript/TypeScript suite
- Critical CVE: [GHSA redacted] (pnpm-lock.yaml)
- Documentation: no project overview (docs/faq/ImmutableData.md)
- High CVE: [GHSA redacted] (pnpm-lock.yaml)
- High CVE: [GHSA redacted] (pnpm-lock.yaml)
- High CVE: [GHSA redacted] (pnpm-lock.yaml)
- High CVE: [GHSA redacted] (pnpm-lock.yaml)
- High CVE: [GHSA redacted] (pnpm-lock.yaml)
- High CVE: [GHSA redacted] (pnpm-lock.yaml)
- High CVE: [GHSA redacted] (pnpm-lock.yaml)
- Job token omits the contents scope its checkout needs
- Low CVE: [GHSA redacted] (pnpm-lock.yaml)
- Medium CVE: [GHSA redacted] (pnpm-lock.yaml)
- Medium CVE: [GHSA redacted] (pnpm-lock.yaml)
- No assertions: ActionCreator (test/typescript/actionCreators.test-d.ts)
- No assertions: AnyAction type is used to allow action property access without requiring type casting. (test/typescript/reducers.test-d.ts)
- No assertions: Dispatch accepts type argument that restricts allowed action types. (test/typescript/dispatch.test-d.ts)
- No assertions: FSA (test/typescript/actions.test-d.ts)
- No assertions: FreeShapeAction (test/typescript/actions.test-d.ts)
- No assertions: Logger middleware doesn't add any extra types to dispatch, just logs actions and state. (test/typescript/middleware.test-d.ts)
- …and 59 more
Changes since last survey
- 69 commits — 63 feature/other, 6 fixes
By area
- (repo) — 15 commits
- docs/usage — 13 commits
- docs/faq — 8 commits
- (root) — 6 commits
- docs/introduction — 6 commits
- docs/tutorials — 6 commits
- website/src — 3 commits
- docs/api — 2 commits
- website/docusaurus.config.ts — 2 commits
- .github/workflows — 1 commit
- docs/package.json — 1 commit
- docs/understanding — 1 commit
- examples/counter-vanilla — 1 commit
- examples/todomvc — 1 commit
- src/types — 1 commit
- test/typescript — 1 commit
- website/plugins — 1 commit
Notable commits
- fix: Fix import type
- fix: Fixes #4662: Remove manual reducer recipes in favour of RTK utilities (#4914)
- fix: Merge pull request #4949 from reduxjs/docs/fix-pagefind-search
- fix: Merge pull request #4952 from haimingZZ/fix/counter-vanilla-readme-link
- fix: Merge pull request #4954 from haimingZZ/docs/fix-duplicate-the-part-4
- fix: docs site: fix pagefind search under rspack by preloading window.pagefind
- change: Docs: add Redux Toolkit equivalents to the Structuring Reducers pages
- change: Docs: add a Debugging Redux usage page
- change: Docs: add a shared Redux Toolkit callout to core-API pages
- change: Docs: adjust Ecosystem library list
- change: Docs: consolidate Introduction pages
- change: Docs: cut Ecosystem page to maintained libraries and RTK built-ins
- change: Docs: cut Reducing Boilerplate down and show the Redux Toolkit equivalents
- change: Docs: drop link to removed Real World example
- change: Docs: extract hand-written reducers note into a shared component
- change: Docs: fix Examples page formatting
- change: Docs: fix broken code samples
- change: Docs: fix dead and redirected links
- change: Docs: point immutability and performance pages at the hooks-based re-render explanation
- change: Docs: remove redundant Redux Toolkit notes on API pages now that the callout exists
- …and 49 more
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
reduxjs/redux was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.
About this page
- The score is its most recent published measurement, taken on 28 September 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
- Measured at commit 3ae0f79bdcce35ac2a4895e284ef04b7dc0ebd5e — the exact code this score is about.
- Scored under rubric-2026.09.16 — the same rubric and the same method as every other entry in this index.
- Measured by watchdog.canine.dev using codehealth-analyzer preprod-eb9197011364.