Next.js Change
Commits: 55b26f9, 3cdb56c
PRs: #97618, #97622
What changed
Next.js adds unstable_prefetch() to next/cache. App Router Server Components can await it to exclude the following subtree from an App Shell while retaining it in static and speculative prefetches. The boundary resolves during static prerendering and static prefetches, and it also resolves in runtime speculative prefetches (<Link prefetch={true}>) and full navigations.
Unlike unstable_navigation(), it does not stop runtime-data tracking: cookies() or headers() below the boundary still make the route request-dependent. It is unavailable in Client Components and the Pages Router.
Impact on vinext
vinext must expose unstable_prefetch() from next/cache and implement its App Router render-stage behavior in development and production. Without it, applications using this experimental Next.js API cannot import it or control whether server-rendered content belongs in an App Shell versus a full prefetch/navigation response.
Acceptance criteria
Related
Next.js Change
Commits:
55b26f9,3cdb56cPRs: #97618, #97622
What changed
Next.js adds
unstable_prefetch()tonext/cache. App Router Server Components can await it to exclude the following subtree from an App Shell while retaining it in static and speculative prefetches. The boundary resolves during static prerendering and static prefetches, and it also resolves in runtime speculative prefetches (<Link prefetch={true}>) and full navigations.Unlike
unstable_navigation(), it does not stop runtime-data tracking:cookies()orheaders()below the boundary still make the route request-dependent. It is unavailable in Client Components and the Pages Router.Impact on vinext
vinext must expose
unstable_prefetch()fromnext/cacheand implement its App Router render-stage behavior in development and production. Without it, applications using this experimental Next.js API cannot import it or control whether server-rendered content belongs in an App Shell versus a full prefetch/navigation response.Acceptance criteria
unstable_prefetch(): Promise<void>fromnext/cachefor App Router Server Components.<Link prefetch={true}>) and full navigations.Related
unstable_prefetchroute segment config #849 -unstable_prefetchroute segment configpartialPrefetchingglobal config andunstable_prefetch = 'partial'segment opt-in #1819 -partialPrefetchingconfig and segment opt-inunstable_navigation()API