next.js icon indicating copy to clipboard operation
next.js copied to clipboard

docs: add an explanation about prefetch on hover to the link.mdx

Open suu3 opened this issue 2 years ago • 0 comments

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?

suu3 avatar Feb 17 '24 07:02 suu3