Client-Side Routing
The URL is application state — shareable, bookmarkable and restorable. Route matching, nesting, history, scroll restoration and the loading boundaries in between.
Intercept the link, match the URL, swap the view — and inherit every job the browser was quietly doing during a real navigation.
How a path becomes a route: segmentation, patterns, specificity, ranking versus ordering, and the nested match chain that renders a page.
Path params identify, query params refine — and both are untrusted strings that have to be parsed, validated and canonicalised before anything renders.
The session history stack, `pushState` versus `replaceState`, `popstate`, and why intercepting navigation without handling back is the most common router bug there is.
The browser does this well and single-page applications break it: `history.scrollRestoration`, restoring on back but not on a forward navigation, and the async data problem that puts you in the wrong place.
Where the spinner belongs: the subtree a fallback is allowed to replace, why nesting them matters, and why one boundary at the top blanks the whole page on every navigation.