Next.js Discord

Discord Forum

Partial Prerendering

Answered
Pine Bunting posted this in #help-forum
Open in Discord
Pine BuntingOP
https://nextjs.org/docs/app/building-your-application/deploying/production-checklist

in "Production Checklist" page, I saw a note which says
Good to know: Partial Prerendering (Experimental) will allow parts of a route to be dynamic without opting the whole route into dynamic rendering.

So I wrapped my user menu with Suspense in the site header to see if it is true. But didn't work.

my pages that are using that layout element are opting out to Dynamic rendering.

when i put
export const dynamic = "error";

in a page, it gives this error:
Page with `dynamic = "error"` couldn't be rendered statically because it used `cookies`

I am using cookies in that user menu, and nowhere else. When i delete that component, the page can be rendered as static. So I'm sure it is the user menu

what am I doing wrong? or is this feature not implemented yet? or did i get it completely wrong?
Answered by Ray
do you have ppr: true in next.config.js?
View full answer

4 Replies