# Data flow — reduxjs/redux

> Canonical page: https://codevetter.com/unpack/redux/data-flow

# Data flow — reduxjs/redux

Scanned commit 56abca4749921d68f40cda20afd2043af9751f72 (2026-09-29). Generated by codevetter codevetter 1.15.0 on 2026-10-02.

Source inspection; upstream code and tests were not executed.

The core input boundary is dispatch, with preloaded state supplying the initial state boundary. Reducers transform state synchronously, and subscribers retrieve the resulting value rather than receiving action or state arguments. Middleware can interpret other input forms before reaching base dispatch. Documentation has a separate pipeline from external source acquisition through code-block checking and static page generation.
- createStore assigns supplied preloaded state to currentState and dispatches INIT before exposing the store, allowing reducers to fill undefined initial state. — [src/createStore.ts#L136-L143](https://github.com/reduxjs/redux/blob/56abca4749921d68f40cda20afd2043af9751f72/src/createStore.ts#L136-L143) [src/createStore.ts#L297-L301](https://github.com/reduxjs/redux/blob/56abca4749921d68f40cda20afd2043af9751f72/src/createStore.ts#L297-L301) [src/createStore.ts#L382-L394](https://github.com/reduxjs/redux/blob/56abca4749921d68f40cda20afd2043af9751f72/src/createStore.ts#L382-L394)
- Base dispatch validates a plain-object action and a defined string type before invoking currentReducer; it returns the original action after listener notification. — [src/createStore.ts#L270-L308](https://github.com/reduxjs/redux/blob/56abca4749921d68f40cda20afd2043af9751f72/src/createStore.ts#L270-L308) [src/utils/isPlainObject.ts#L5-L15](https://github.com/reduxjs/redux/blob/56abca4749921d68f40cda20afd2043af9751f72/src/utils/isPlainObject.ts#L5-L15)
- combination passes each slice's previous value and the same action to its reducer, builds nextState, and retains the old root object only if references and key counts match. — [src/combineReducers.ts#L177-L199](https://github.com/reduxjs/redux/blob/56abca4749921d68f40cda20afd2043af9751f72/src/combineReducers.ts#L177-L199)
- Subscription mutations use a copied nextListeners Map, while dispatch iterates its captured listener Map; callbacks receive no arguments and getState returns currentState. — [src/createStore.ts#L152-L175](https://github.com/reduxjs/redux/blob/56abca4749921d68f40cda20afd2043af9751f72/src/createStore.ts#L152-L175) [src/createStore.ts#L219-L241](https://github.com/reduxjs/redux/blob/56abca4749921d68f40cda20afd2043af9751f72/src/createStore.ts#L219-L241) [src/createStore.ts#L304-L307](https://github.com/reduxjs/redux/blob/56abca4749921d68f40cda20afd2043af9751f72/src/createStore.ts#L304-L307)
- Middleware receives getState and a forwarding dispatch closure; its chain wraps the base dispatch, so calls to middlewareAPI.dispatch use the completed outer chain. — [src/applyMiddleware.ts#L65-L75](https://github.com/reduxjs/redux/blob/56abca4749921d68f40cda20afd2043af9751f72/src/applyMiddleware.ts#L65-L75)
- The inspected core stores state in memory and accepts preloaded state for hydration; persistence is described as an enhancer capability rather than implemented as serialization or disk writes in createStore. — [src/createStore.ts#L136-L143](https://github.com/reduxjs/redux/blob/56abca4749921d68f40cda20afd2043af9751f72/src/createStore.ts#L136-L143) [src/createStore.ts#L413-L422](https://github.com/reduxjs/redux/blob/56abca4749921d68f40cda20afd2043af9751f72/src/createStore.ts#L413-L422)
- Counter input remains a local string until Number(incrementAmount) || 0 converts it; incrementAsync awaits a 500ms mock Promise and feeds its numeric result into the fulfilled reducer. — [examples/counter-ts/src/features/counter/Counter.tsx#L14-L19](https://github.com/reduxjs/redux/blob/56abca4749921d68f40cda20afd2043af9751f72/examples/counter-ts/src/features/counter/Counter.tsx#L14-L19) [examples/counter-ts/src/features/counter/counterSlice.ts#L20-L26](https://github.com/reduxjs/redux/blob/56abca4749921d68f40cda20afd2043af9751f72/examples/counter-ts/src/features/counter/counterSlice.ts#L20-L26) [examples/counter-ts/src/features/counter/counterSlice.ts#L51-L62](https://github.com/reduxjs/redux/blob/56abca4749921d68f40cda20afd2043af9751f72/examples/counter-ts/src/features/counter/counterSlice.ts#L51-L62) [examples/counter-ts/src/features/counter/counterAPI.ts#L1-L6](https://github.com/reduxjs/redux/blob/56abca4749921d68f40cda20afd2043af9751f72/examples/counter-ts/src/features/counter/counterAPI.ts#L1-L6)
- External documentation is copied or sparsely cloned into website/external; TypeScript code blocks become virtual files, receive checker diagnostics, and are syntactically emitted through oxc for JavaScript presentation. — [website/scripts/fetch-external-docs.mts#L101-L136](https://github.com/reduxjs/redux/blob/56abca4749921d68f40cda20afd2043af9751f72/website/scripts/fetch-external-docs.mts#L101-L136) [website/plugins/remark-typescript-tools/transpileCodeblocks/plugin.ts#L157-L183](https://github.com/reduxjs/redux/blob/56abca4749921d68f40cda20afd2043af9751f72/website/plugins/remark-typescript-tools/transpileCodeblocks/plugin.ts#L157-L183) [website/plugins/remark-typescript-tools/transpileCodeblocks/compiler.ts#L117-L184](https://github.com/reduxjs/redux/blob/56abca4749921d68f40cda20afd2043af9751f72/website/plugins/remark-typescript-tools/transpileCodeblocks/compiler.ts#L117-L184) [website/plugins/remark-typescript-tools/transpileCodeblocks/compiler.ts#L187-L213](https://github.com/reduxjs/redux/blob/56abca4749921d68f40cda20afd2043af9751f72/website/plugins/remark-typescript-tools/transpileCodeblocks/compiler.ts#L187-L213)

Every claim links to its cited files at the pinned commit. Citations identify source evidence; they do not establish runtime correctness. Independent CodeVetter scan — not reviewed by upstream maintainers.

## Public product links

- [CodeVetter](https://codevetter.com/)
- [Download](https://codevetter.com/download)
- [Documentation](https://codevetter.com/docs/)
- [Source](https://github.com/Codevetter/codevetter)
