References — fw-08 A Client-Side Router
Primary sources first. Read the real implementation after you have written yours, never before.
Platform primitives — the whole module rests on these
- HTML Standard — History interface —
pushState,replaceState, and thepopstatesemantics that catch everyone - Navigation API — the modern replacement: intercepting navigations, transitions, and a real event for all navigations rather than only back/forward. Explainer.
- URL Standard —
URLandURLSearchParams; do not parse URLs by hand - URLPattern — native route-pattern matching, which removes most of a router's parsing code
- Scroll restoration —
history.scrollRestoration, the detail every hand-rolled router forgets
Routers to read
- React Router — data loading integrated with routing; read the decision docs
- TanStack Router — type-safe route definitions and search-param handling
- Vue Router · SvelteKit routing
The hard parts
- Nested routes and layout preservation · scroll restoration on back · in-flight navigation cancellation · focus management after navigation (an accessibility requirement, not a nicety) · code-split route loading without waterfalls
- Accessible client-side routing — the user-testing study behind focus-on-navigation guidance
Related modules
- fw-09 — Query cache — route-level data loading is where these two meet
- fe-15 — State taxonomy (planned) — URL as a first-class state location
- fe-24 — Accessibility (planned) — focus management after navigation
When a claim here proves stale, record it in PROGRESS.md section 7.