Next.js Discord

Discord Forum

Experimental PPR

Unanswered
West African Lion posted this in #help-forum
Open in Discord
West African LionOP
So Next JS introduces PPR (Partial Pre Rendering) in their upcoming Next 16. My question is, whats the difference in between using <Suspense> with and without experimental_ppr turned on? Doesn't using Suspense as it's own enable streaming?

https://nextjs.org/docs/app/getting-started/partial-prerendering

3 Replies

Chub mackerel
Suspense give you streaming, but with PPR the static shell gets cached + streamed around it. Without PPR, the whole page is dynamic once you use Suspense.
West African LionOP
So meaning, without PPR, if my application has even one dynamic component, the entire page is rendered on demand? (Even if I use Suspense). Meaning HTML files are not pre-generates? The only way to have a pre-rendered html file used to be having no dynamic components in the page?

Without PPR: Page is rendered on demand and the part containing Suspense is streamed afterwards.

With PPR: The page is already created (shell) and it contains some holes (Suspense boundaries). This shell is sent immediately (not on demand) and then the holes are filled with data streaming.

Am I right?
Chub mackerel
Yeah that’s the idea. With PPR the static bits (like your <h1>) get pre-rendered and cached as the shell, while anything inside <Suspense> streams in later. Without PPR, once you add a dynamic part, the whole page has to be rendered on demand instead of caching the static shell.