mirror of
https://github.com/hanzoai/next.js.git
synced 2026-09-24 17:00:51 +00:00
`prefetch={true}` with `cacheComponents` was opting into runtime
prefetching, with `unstable_forceStale` preserving the old behavior of
fetching the full (stale) data. However we only intended to expose
runtime prefetching via the `export const prefetch` segment config.
This removes `unstable_forceStale` and restores previous
`prefetch={true}` behavior. I've disabled some of the tests that were
relying on the old link behavior for opting into runtime prefetching -
we'll need to refactor those to use the segment opt-in or just remove
them all together.
Fixes #85162
Closes NAR-320
43 lines
1.1 KiB
TypeScript
43 lines
1.1 KiB
TypeScript
import { LinkAccordion } from './link-accordion'
|
|
|
|
export default function Page() {
|
|
return (
|
|
<>
|
|
<ul>
|
|
<li>
|
|
<LinkAccordion prefetch={true} href="/page-with-dynamic-head">
|
|
Page with dynamic head (prefetch=true)
|
|
</LinkAccordion>
|
|
</li>
|
|
<li>
|
|
<LinkAccordion
|
|
prefetch={true}
|
|
href="/rewrite-to-page-with-dynamic-head"
|
|
>
|
|
Rewrite to page with dynamic head (prefetch=true)
|
|
</LinkAccordion>
|
|
</li>
|
|
</ul>
|
|
<hr />
|
|
<ul>
|
|
<li>
|
|
<LinkAccordion
|
|
prefetch={true}
|
|
href="/page-with-runtime-prefetchable-head"
|
|
>
|
|
Page with runtime-prefetchable head (prefetch=true)
|
|
</LinkAccordion>
|
|
</li>
|
|
<li>
|
|
<LinkAccordion
|
|
prefetch={true}
|
|
href="/rewrite-to-page-with-runtime-prefetchable-head"
|
|
>
|
|
Rewrite to page with runtime-prefetchable head (prefetch=true)
|
|
</LinkAccordion>
|
|
</li>
|
|
</ul>
|
|
</>
|
|
)
|
|
}
|