0
Challenge · 16Data & Reads
Streaming with Suspense
Renderingused in ~88% of apps
One slow query should not hold your entire page hostage. The amateur move is to await everything at the top of the page, so the user stares at a blank screen until the slowest fetch finishes. The Next.js move is to send the fast shell immediately and stream the slow parts in as they resolve — wrapping each slow region in <Suspense>. This is the single biggest perceived-performance lever in the App Router, and interviewers know it.
Core idea. Wrap a slow async region in `<Suspense fallback={...}>`. Next.js sends the surrounding shell (and the fallback) in the first byte, then streams the real content in over the same response when its data resolves. You put one boundary per independent slow concern — NOT one giant boundary around the whole page.
poke it, drag it,
try to break it
try to break it
no slides here.
you drive.
you drive.
Playground, this isn't a screenshot
Where do the Suspense boundaries go?
<Suspense fallback={<Spinner/>}><PanelA /></Suspense>
<Suspense fallback={<Spinner/>}><PanelB /></Suspense>
<Header />static — never suspends
Suspense
<PanelA />fast data
loaded
Suspense
<PanelB />slow data
loaded
One boundary per panel = independent reveals. Each panel shows its own spinner and pops in the moment it is ready — the slow panel no longer holds the fast one hostage. The header sits outside both boundaries, so it never disappears.
↑ play a little first, then dig in