roadmap
- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
Prepare for Vue Router interviews by explaining how a URL becomes a component tree and why a navigation runs, waits or fails. Covers matching, nested views, guards, lazy routes and typed file routes.
105 of 105 questions in your plan: 0 known, 0 in progress, 0 due, 0 skipped, 105 new. 0 cut, outside your plan.
Vue Router rarely gets a round of its own. It comes up inside Vue frontend loops: in a technical conversation about how an app is put together, in the review of a take-home, or as a bug to explain on a shared screen. The scenarios are small and specific. A product page still shows product 1 after the URL changes to product 2. A login guard sends signed-out users away but forgets where they were going. A deep link renders the 404 page because the route it needs is only added after sign-in. A fade never plays between two messages.
A junior answer names the API: router.push, a beforeEach guard, the :id param. A middle answer explains the mechanism behind the symptom: when only a param changes the router reuses the component instance, so setup does not run again and the code has to react to the route instead; a guard that returns a location starts a new navigation, and one that returns false cancels it. A senior answer reasons about the whole navigation: the order in which global, per-route and in-component guards resolve, what a lazily loaded route downloads and when, how runtime routes are registered and removed when a tenant switches, and which mistakes a typed route map still lets through.
The plan opens with routing as it works in any framework. Client-side routing treats the URL as application state and introduces route tables, nested outlets, guards and lazy routes without a Vue API in sight, so each later router module has a neutral idea to attach to. Beside it sit the History API the router drives, which is why a reloaded deep link needs a server fallback, and file-based route conventions, the idea that typed file routes build on at the end.
The second stretch is the part of Vue the router plugs into. It is installed as an app plugin, and its view outlet is where transitions and <KeepAlive> are most often used, so both come first. So does defineAsyncComponent, because a lazy route component deliberately does without it, and the difference is a common question.
Vue Router itself then runs from setup to scale. History modes and param matching decide which record a URL hits, nested and named views decide what renders, and links and programmatic navigation move between them. Navigation guards sit in the middle of that path, and that is where most senior questions land. Lazy and runtime routes and typed file routes close the module, because both change how the route table is produced rather than how it behaves. The plan ends on mounting routed components in tests, where a router shared between tests quietly carries state from one to the next.
New to Vue Router, or early in your career? Take the opening concepts quickly and spend real time on matching, nested views and guards: narrow level to junior through middle, keep study order on by frequency, and expect the reused-instance and guard-return questions early. If you already route in React or Angular, skim the foundations and start at the Vue stretch, because what differs is mostly how Vue renders the outlet and when its guards run. Senior candidates do better to switch study order to by topics and work through guards, runtime routes and typed file routes in sequence; the questions there are about the order of a navigation, not the name of a hook. This plan treats the router as the subject and Vue as a prerequisite. Reactivity, components in depth, state with Pinia and server rendering with Nuxt belong to the [Vue roadmap](/roadmaps/vue), which carries this router as one of its modules.
New to Vue Router, or early in your career? Take the opening concepts quickly and spend real time on matching, nested views and guards: narrow level to junior through middle, keep study order on by frequency, and expect the reused-instance and guard-return questions early. If you already route in React or Angular, skim the foundations and start at the Vue stretch, because what differs is mostly how Vue renders the outlet and when its guards run. Senior candidates do better to switch study order to by topics and work through guards, runtime routes and typed file routes in sequence; the questions there are about the order of a navigation, not the name of a hook.
This plan treats the router as the subject and Vue as a prerequisite. Reactivity, components in depth, state with Pinia and server rendering with Nuxt belong to the Vue roadmap, which carries this router as one of its modules.