next.js
5aa4568b - Ignore `prefetch={true}` on Links to routes with `instant` (#90061)

Commit
5 days ago
Ignore `prefetch={true}` on Links to routes with `instant` (#90061) When a route has `unstable_instant` defined on any segment, setting `prefetch={true}` on a Link to that route is now a no-op. The prefetch behaves the same as the default auto strategy — cached content is prefetched but dynamic content is deferred to navigation time. A full static prefetch doesn't make sense for routes with instant configs, since those segments use runtime prefetching. Rather than silently doing something the developer didn't intend, we ignore the prop entirely. To detect this on the client, the server now sends a bitmask instead of a boolean for the per-segment prefetch metadata. One bit tracks whether the subtree contains any instant config, which propagates up so the client can check it at the root without traversing.
Author
Parents
Loading