Next.js · Middle · Question 12 of 75

How do you show a page with slow data in Next.js without delaying the whole page?

Explanation

The server sends the shell and fallback right away and appends the slow block's HTML to the stream when it's ready. Loading in useEffect sends empty HTML, adds a request waterfall and hurts LCP. With Cache Components, uncached data must be inside <Suspense>.

Further reading

Problem with a question

Next.js · Middle · question 12

Test yourself

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

Take this quiz