mirror of
https://github.com/hanzoai/next.js.git
synced 2026-10-30 14:46:38 +00:00
Fixes a mistake in the client when constructing a route tree from a partial server response. When applying the patch, we must propagate the new subtree hints all the way up to the root. This was an existing bug that I found when implementing the next PR in the stack, which relies on the subtree hint mechanism. I've split it out into its own step and confirmed the bug + fix using a regression test expressed via existing behavior. <!-- NEXT_JS_LLM_PR -->
22 lines
644 B
TypeScript
22 lines
644 B
TypeScript
import { LinkAccordion } from '../components/link-accordion'
|
|
|
|
// The partial-prefetch opt-in lives on the deeply nested /a/b/c page. For a
|
|
// `prefetch={true}` link to be downgraded to a partial (PPR) prefetch, the
|
|
// `SubtreeHasPartialPrefetching` hint must propagate from that leaf up through
|
|
// the /a/b and /a layout segments to the root, where the prefetch scheduler
|
|
// reads it.
|
|
export default function Page() {
|
|
return (
|
|
<main>
|
|
<h1 id="home">Home</h1>
|
|
<ul>
|
|
<li>
|
|
<LinkAccordion href="/a/b/c" prefetch={true}>
|
|
Deep route
|
|
</LinkAccordion>
|
|
</li>
|
|
</ul>
|
|
</main>
|
|
)
|
|
}
|