Next.js · Junior · Question 11 of 75
What is the loading.tsx file for?
- ✓Correct answer: An instant segment fallback: Next.js wraps the page in
<Suspense> - 2It sets a loading indicator for all
fetchrequests in the browser - 3It's shown only on the first visit to the site, like a splash screen
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.