Next.js · Senior · Question 51 of 75
With Partial Prefetching enabled, what does await prefetch() inside a component do?
async function Recommendations() {
await prefetch()
const items = await getRecommendations()
return <List items={items} />
}- ✓Correct answer: Keeps the work below it out of the route's App Shell; it renders during a per-link prefetch or the navigation
- 2Prefetches all links on the page immediately
- 3Forces the component to render only on the client
Explanation
The nearest <Suspense> fallback goes into the shell instead. It requires cacheComponents and has no effect without partialPrefetching.