Next.js · Senior · Question 45 of 75

Why does reading searchParams at the top level of a page reduce the benefit of PPR?

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.

Further reading

Problem with a question

Next.js · Senior · question 45

Test yourself

Take the Next.js · Senior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz