Next.js · Middle · Question 10 of 75

What does loading.tsx do during client navigation to a segment with slow data?

Explanation

Navigation is instant: the layout stays interactive, the loading.tsx fallback is shown instead of the page, and the content streams in. The fallback can be prefetched along with the link. Without loading.tsx or <Suspense>, navigation would wait for the data.

Further reading

Problem with a question

Next.js · Middle · question 10

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