next.js
next.js copied to clipboard
docs: add an explanation about prefetch on hover to the link.mdx
Hello, I noticed the following code in link.tsx.
//client/link.tsx
...
onMouseEnter(e) {
...
if (
(!prefetchEnabled || process.env.NODE_ENV === 'development') &&
isAppRouter
) {
return
}
prefetch(
...
)
},
It seems that when prefetch={false} is set, prefetch still occurs on hover for page routers. However, there is no explanation in the documentation, which caused misleading. I added the explanation inside PageOnly component, could you please review it?