-
Notifications
You must be signed in to change notification settings - Fork 26.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Link
is not prefetching on hover if prefetch=false
is given - as per documentation
#50412
Comments
That’s is disabled for app router if (!prefetchEnabled && isAppRouter) { |
Why is that, can anyone explain? |
To be clear that prefetching will not work in dev mode will only works in production mode @adiathasan |
Yeah, I have built the app and tried it to be clear if you see above. |
I'm also interested. |
Any news on this? It is a bug, or the documentation needs updating that I am running the app in production, all other links in the viewport prefetch as expected and written in docs. |
I would expect that prefetch on hover continue to work. It seems another regression like #61816. |
Verify canary release
Provide environment information
Operating System: Platform: darwin Arch: arm64 Version: Darwin Kernel Version 22.4.0: Mon Mar 6 21:01:02 PST 2023; root:xnu-8796.101.5~3/RELEASE_ARM64_T8112 Binaries: Node: 16.18.1 npm: 8.19.2 Yarn: 1.22.19 pnpm: N/A Relevant packages: next: 13.4.5-canary.0 eslint-config-next: 13.4.4 react: 18.2.0 react-dom: 18.2.0 typescript: 5.0.4
Which area(s) of Next.js are affected? (leave empty if unsure)
Routing (next/router, next/navigation, next/link)
Link to the code that reproduces this issue or a replay of the bug
https://github.com/adiathasan/mui-react-hook-form-plus/tree/master/next-server-components-demo
To Reproduce
<Link prefetch={false} href="/your-route" />
- by defaultprefetch=true
/your-route
directories as per suggested in theapp
dirterminal 👉
yarn build
open port
http://localhost:3000
inspect dev tools
go to network tab
see
hovering
on thelink
that points to/your-route
Describe the Bug
It is being said that in the
Link
component if we setprefetch=false
it will prefetch the route on hover. Below is the ss of what's coming from the description of the prop. See image vBut it's not fetching the
route
onhover
in the backgroundExpected Behavior
Should fetch the page on
hover
ifprefetch=false
is set onhover
inLink
/next/link
Which browser are you using? (if relevant)
Chrome
How are you deploying your application? (if relevant)
Local build, next start
The text was updated successfully, but these errors were encountered: