Course map
Stage 1: App Router Foundations
Stage 2: The Rendering Model
Stage 3: Data, Caching and Mutations
Stage 4: Full-Stack Next.js
Stage 5: Production and Specialization

Part 07 / Topic 3 of 7

Where to place a boundary — and the build error when you don't

Section 2's getTodaysSummary() runs with no await at all, so it completes during prerendering and sits in the static shell no matter what — wrapping it in <Suspense> would buy nothing. The two genuinely slow reads earn their boundaries. The rule, straight from the installed package's own streaming guide: "push dynamic access down to the components that need it... wrap those in <Suspense>."

What happens if a slow read has no boundary at all? Remove the <Suspense> around LiveDelayedOrders and call it directly:

<h2>Live delayed orders</h2>
<LiveDelayedOrders />

Real build against this course's harness, with cacheComponents: true (Part 1, section 8) on:

$ npm run build
...
Error: Route "/ops": Next.js encountered uncached or runtime data during prerendering.

`fetch(...)`, `cookies()`, `headers()`, `params`, `searchParams`, or `connection()` accessed outside of `<Suspense>` prevents the route from being prerendered, blocking the page load and leading to a slower user experience.

Ways to fix this:
  - [stream] Provide a placeholder with `<Suspense fallback={...}>` around the data access
  - [cache] For uncached data (`fetch`, database calls): cache the access with `"use cache"` (does not apply to `connection()`)
  - [block] Set `export const instant = false` to allow a blocking route

Cache Components does not let an uncached, un-boundaried async read through silently — it fails the build outright, the same blocking-prerender-dynamic error Part 2 section 4 first ran into for a different reason (a dynamic route with no generateStaticParams). Restoring the <Suspense> wrapper fixes it immediately; this is the exact fix the error message itself names first ([stream]).

Done here? The practice set for Part 7 — including the solutions — is on the part page.

Search the guide