Skip to content
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

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

Merged
merged 5 commits into from
Feb 21, 2024

Conversation

suu3
Copy link
Contributor

@suu3 suu3 commented Feb 17, 2024

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 suu3 requested review from a team as code owners February 17, 2024 07:05
@suu3 suu3 requested review from manovotny and delbaoliveira and removed request for a team February 17, 2024 07:05
Copy link
Member

@samcx samcx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for submitting a :pr:!

:lgtm:

@samcx samcx enabled auto-merge (squash) February 20, 2024 17:48
@ijjk
Copy link
Member

ijjk commented Feb 20, 2024

Allow CI Workflow Run

  • approve CI run for commit: 55dac3b

Note: this should only be enabled once the PR is ready to go and can only be enabled by a maintainer

@samcx
Copy link
Member

samcx commented Feb 21, 2024

@suu3 No need to merge the latest canary!

@samcx samcx merged commit 9feaffa into vercel:canary Feb 21, 2024
31 checks passed
@github-actions github-actions bot added the locked label Mar 6, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 6, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants