Next.js · Junior · Question 11 of 75

What is the loading.tsx file for?

Explanation

Next.js automatically wraps page (and nested segments) in <Suspense fallback={<Loading />}>. The user immediately sees the layout and a skeleton, while content streams in when ready. For finer control, place your own <Suspense> inside the page.

Further reading

Problem with a question

Next.js · Junior · question 11

Test yourself

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

Take this quiz