Question presented to candidate:
"I read that <Suspense> became stable with Vue 3.5 in 2024. Is that right? Either way, explain how it behaves in 3.5 when the user switches between async views: when does the fallback appear, what does timeout do, and how do nested boundaries behave?"
What a strong answer should cover:
- Correct the premise: Vue 3.5 (released 3 September 2024) did not stabilize Suspense. The 3.5.44 runtime still logs that it is experimental and the guide still opens with an "Experimental Feature" warning; the 3.6 release candidate prints the same message.
- After the first resolve, a boundary only goes pending again when the root node of
#defaultis replaced, and by default it keeps the old content until the new tree resolves, with no fallback. timeout:0shows the fallback immediately on a switch,Nafter N ms; the value is read when the boundary is created.suspensible(added in 3.3) lets a nested Suspense hand its dependencies to the parent so both levels swap in one step.- Events
pending/fallback/resolve, and that lazily loaded router components do not trigger Suspense at all. - What 3.5 actually changed: many Suspense bug fixes across the 3.5.x line, plus neighbouring features (lazy hydration, deferred Teleport), not a status change.
Clarifying questions expected:
- "Are we talking about first load or switching between already-loaded views?"
- "Are the views lazy routes, async components, or components with an async
setup()?"
Code / implementation expected: Optional β a Suspense with timeout, or a nested suspensible boundary, with the observed sequence of events.