Phase 2 of 4 · Study weeks 5-8
Types, components, state and accessibility
This phase makes the second checkpoint possible: a typed, accessible app whose state has one owner.
Topics every week
- Week 58 h
- TypeScript strict mode
- Unions and narrowing
- Generics
- Types at the boundary (parsing API data)
Hand inThe app typed under strict mode with parsed API responses
- Week 68 h
- React components and rendering
- State and effects
- Keys and reconciliation
- When effects are the wrong tool
Hand inThe product list and product page, with a note on each effect you removed
- Week 78 h
- State ownership
- Server state against client state
- Caching and invalidation
- The cart as a state machine
Hand inThe cart with a test per transition and the seeded stale-total bug
- Week 88 h
- Semantic HTML and ARIA
- Keyboard and focus
- Screen reader testing
- Accessible dialogs, menus and forms
Hand inCheckpoint 2, with the keyboard-only run and the automated scan
Practice projects
- Practice 1, strict mode (Week 5): turn on
strictin an existing project. Done when: it compiles, and you list three places the checker exposed a real bug or a wrong assumption. - Practice 2, remove an effect (Week 6): replace three
useEffectcalls with derived values or event handlers. Done when: each change is explained and a test shows the behaviour is the same. - Practice 3, the cart machine (Week 7): model the cart with explicit states and events. Done when: a test covers every transition and the stale-total bug fails the test before the fix.
- Optional, a screen reader run: buy a product using only a screen reader. Done when: you write down every point where the announcement was wrong or missing.
GitHub repos to study
Existence and last commit were checked on 22 Nov 2026 by shallow clone. Every repository below had a commit in the last 12 months.
| Repo | What to read | Week |
|---|---|---|
| microsoft/TypeScript | The handbook source and the checker's narrowing rules | 5 |
| facebook/react | The reconciler and how hooks are stored | 6 |
| TanStack/query | Caching and invalidation design | 7 |
| pmndrs/zustand | External-store design and subscriptions | 7 |
| radix-ui/primitives | Accessibility and composition patterns | 8 |
Milestone checkpoint
Build Checkpoint 2. Type the app under strict mode first. Model the cart, then write the transition tests and watch the seeded bug fail one. Build the search box, menu and dialog and test them with the keyboard and a screen reader. Hand in the strict compile, the test report, the scan result, ADR-3 (state ownership) and ADR-4 (the accessibility rules for custom components).
Check yourself
Answer each question in your head first, then open it to check.
What does strict mode catch that loose mode does not?
Uncheckednullandundefined, implicitanyand loose function types, so a whole class of runtime errors becomes a compile error.Why is an effect often the wrong tool?
Effects run after render and copy state around, which causes extra renders and stale values. A derived value or an event handler is simpler.What is the difference between server state and client state?
Server state is data owned elsewhere that can go stale and needs caching and refetching. Client state is local, such as an open menu.When is ARIA the wrong choice?
When a native element does the job. A realbuttongives focus, keys and a role with no ARIA.What must a modal dialog do for a keyboard user?
Move focus into the dialog, keep it inside while open, close on Escape and return focus to the element that opened it.