Next.js · Middle · Question 10 of 75
What does loading.tsx do during client navigation to a segment with slow data?
- ✓Correct answer: Immediately shows a fallback, keeping the shared layout, while the segment loads
- 2Blocks navigation until the data is fully loaded
- 3Performs a full page reload with the browser's indicator
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.