skip to content

Client-Side Routing

How a URL becomes a rendered screen with no page load: a route table, nested outlets, navigation, guards and lazily loaded route code. Interviewers start here because the URL is shared state.

on this pageshow

explore

questions

page 2 of 2

How would you divide access decisions between client route guards and server enforcement across many role-gated screens?

level: principalimportance: should knowfreq 50%

basics

~20 s

Policy gets one owner: the server. It hands the client a computed capability set that guards, menus and links read, so the app stops offering screens that would only fail — while the server authorizes every request.

open as a page

As the lead on an app with hundreds of lazily loaded routes, how do you decide what preloads, on which signals, and how far ahead?

level: principalimportance: should knowfreq 40%

basics

~20 s

Tier it by confidence and cost: preload the matched branch on strong intent like hover or focus, nominate a short list of likely-next routes for idle time, leave the long tail to the click, and tune from measured hit rate.

open as a page

How do you decide how many layout levels a deeply nested route hierarchy needs and what each level owns?

level: principalimportance: should knowfreq 34%

basics

~20 s

Add a level only when something at that depth must persist across navigations below it, own a region of the screen, or scope an access check or data load. URL segments do not by themselves justify levels.

open as a page

When would a router render two matched branches into separate named outlets at once, and what does that cost?

level: seniorimportance: nice to knowfreq 30%

basics

~20 s

Use named outlets when two regions of a screen are independently routable and worth linking to — a list beside a detail, or a persistent side panel. The cost is that one URL must describe several branches at once.

open as a page

How would you decide whether an app's route table is declared explicitly in code or derived from the project's file layout?

level: principalimportance: nice to knowfreq 38%

basics

~20 s

Decide by how regular the URL surface is and who reads it. Derivation removes registration and makes URLs findable by file; an explicit table makes the whole surface readable and programmable. Either way the effective table must be printable.

open as a page

showing 31–35 of 35