Build your own Redux
A predictable state container: a store, reducers, dispatch, subscriptions and middleware, then bindings for a UI.
- Intro
- About 3–6 h
- 4 checkpoints
- 2 tutorials · JavaScript
Pick a tutorial, then check yourself at each checkpoint. Work in any language you like.
Choose a tutorialWhy build it
State libraries are small. Writing one shows why updates must be immutable and how middleware and selectors fit around a single reducer.
You will be able to
- Implement createStore with getState, dispatch and subscribe.
- Combine reducers and keep every update immutable.
- Add middleware for logging and asynchronous actions.
- Connect components so they re-render only when their slice changes.
Skills it exercises
Recommended on Frontend Engineer.
How you know you are there
Work in any language. Each checkpoint ends with something you can run or observe, so you can check it yourself.
- Checkpoint 1Self-check
Store
Done when: createStore(reducer) supports getState, dispatch and subscribe, and unsubscribing stops notifications.
- Checkpoint 2Self-check
Combined reducers
Done when: Two slices of state are updated by separate reducers, and a test fails if any reducer mutates its input.
- Checkpoint 3Self-check
Middleware
Done when: A logger and a thunk-style middleware work together through applyMiddleware.
- Checkpoint 4Self-check
UI binding
Done when: A to-do app uses your store, and each component re-renders only when the slice it reads changes.
Stretch goals
- Memoised selectors.
- Time-travel debugging by recording actions.
Step-by-step guides
Pick one in a language you know (tutorial languages: JavaScript). They open on the author’s site.
- JavaScript
Build Yourself a Redux(external site)
JavaScript: builds Redux and its React bindings step by step.
- JavaScript
Let’s Write Redux!(external site)
JavaScript: a shorter version of the core store.
Practice builds are self-paced: Tech Atlas does not track them or count them as evidence. To show a skill, take its knowledge check from the skill page.
Tutorials come from codecrafters-io/build-your-own-x (CC0, snapshot of 2026-07-14, commit aa17439; links checked on 2026-10-19). Each tutorial belongs to its author and keeps its own licence; Tech Atlas links to it and does not host it. Briefs, checkpoints and the mapping to skills are Tech Atlas editorial drafts.