Stage 4

Stage 4: Routing and Application Architecture

✅ Complete. Every part below has its full lesson (README.md), examples/, exercises.md and solutions/, and the examples and solutions were actually run — see each part's README for real, captured output and ../TOOLING.md for the verified toolchain.

Goal: Turn a single-screen app into a real multi-page client-side app, and learn to structure a growing codebase so it doesn't collapse under its own state. Time: ~9 h of lessons + ~8–10 h capstone (~17–19 h total) at 1–1.5 hours a day · Level: Stage 3 done (fetching, performance, error boundaries, testing)

Scope boundary: this stage stops at client-side routing (React Router, rendered entirely in the browser). Server-side rendering, file-based routing, and React Server Components belong to the planned Next.js course — see DESIGN-NOTES.md.


Parts in this stage

Part Topic Learning outcomes Time
15 React Router Set up a router; define routes and nested routes; read URL params; navigate with <Link>/useNavigate; build a "protected route" that redirects when a (mock) auth state is missing; build a catch-all 404 route ~5 h
16 Structuring a growing app Reorganize a project into feature folders instead of type folders (components/, hooks/, pages/); read a decision-tree note on when useContext/useReducer stop being enough and a state-management library earns its weight; handle environment variables and a basic static-host deploy ~4 h

Prerequisites for this stage

Stage 4 capstone {#capstone}

Bookstore SPA — the course's main capstone. A multi-page, router-driven, fully client-rendered app, e.g.:

Acceptance sketch (the project README has the final checklist):

This capstone is the project most students show in an interview — it is the natural "is this person job-ready at React" checkpoint before Stage 5.

Next

Stage 5: Specialization

Search the guide