reduxjs/redux
6 articles
Prerequisites
- ›Basic JavaScript and ES modules
- ›Experience using Redux as a consumer (actions, reducers, store)
Redux in 1,575 Lines: Architecture Overview and Project Navigation
A high-level map of the Redux core codebase — 17 source files, 9 public exports, and the architectural decisions that made it one of JavaScript's most influential libraries.
Inside createStore: Closures, Listeners, and the Dispatch Cycle
A line-by-line walkthrough of createStore.ts — the 500-line heart of Redux, covering argument shuffling, the dispatch cycle, dual-Map listener snapshotting, and the enhancer short-circuit.
combineReducers: Reducer Composition, Validation, and the Reference Equality Trick
How combineReducers validates slice reducers at creation time and optimizes runtime execution with reference equality, plus a look at compose and bindActionCreators.
applyMiddleware in 25 Lines: The Middleware Pipeline and Store Enhancement
A deep dive into Redux's most elegant abstraction — the StoreEnhancer pattern and its primary implementation, applyMiddleware, in just 25 lines of runtime code.
Redux's Type System: Conditional Types, Generic Inference, and Type-Level Testing
An exploration of Redux's sophisticated TypeScript type architecture — from Action up to StoreEnhancer, with conditional inference, the UnknownIfNonSpecific trick, and type-level tests.
From Source to Bundle: Error Mangling, Multi-Format Builds, and Dev/Prod Divergence
How Redux's build system transforms 17 source files into optimized bundles — tsup/esbuild pipeline, React-inspired error mangling, kindOf dev/prod splitting, and built-artifact testing.