Next.js · Senior · Question 45 of 75
Why does reading searchParams at the top level of a page reduce the benefit of PPR?
- ✓Correct answer: Everything below
await searchParamsdrops out of the static shell - 2
searchParamsaren't available on pages with Cache Components - 3It turns the whole page into a client component
Explanation
Search params are request data. If await searchParams is at the page root, the static shell is almost empty. Better to pass the promise down and unwrap it in a component inside <Suspense>, keeping the heading, filters and navigation in the shell.