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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: Fix typo for ReactDOM.prefetchDNS method inside Resource Hints section #65111

Merged
merged 2 commits into from Apr 29, 2024

Conversation

jonathan-ingram
Copy link
Contributor

@jonathan-ingram jonathan-ingram commented Apr 27, 2024

Closes #65110

Fixed a typo inside the Resource Hints section that incorrectly stated the existence of ReactDOM.preconnectDNS when it should be declared as ReactDOM.prefetchDNS instead.

Update: 29th April 2024 - As correctly stated by @eps1lon this line has now been removed completely, as the missing type definitions for ReactDOM have been available for a while now. See discussion 馃憠 #65111 (comment)

Fixed a typo that incorrectly stated the existence of ReactDOM.preconnectDNS when it should be declared as ReactDOM.prefetchDNS instead.
@jonathan-ingram jonathan-ingram requested review from a team as code owners April 27, 2024 13:53
@jonathan-ingram jonathan-ingram requested review from molebox and StephDietz and removed request for a team April 27, 2024 13:53
@ijjk ijjk added the Documentation Related to Next.js' official documentation. label Apr 27, 2024
@ijjk
Copy link
Member

ijjk commented Apr 27, 2024

Allow CI Workflow Run

  • approve CI run for commit: 62762ba

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

@ijjk
Copy link
Member

ijjk commented Apr 27, 2024

Allow CI Workflow Run

  • approve CI run for commit: 312b559

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

@@ -1041,7 +1041,7 @@ ReactDOM.prefetchDNS(href: string)
>
> - These methods are currently only supported in Client Components, which are still Server Side Rendered on initial page load.
> - Next.js in-built features such as `next/font`, `next/image` and `next/script` automatically handle relevant resource hints.
> - React 18.3 does not yet include type definitions for `ReactDOM.preload`, `ReactDOM.preconnect`, and `ReactDOM.preconnectDNS`. You can use `// @ts-ignore` as a temporary solution to avoid type errors.
> - React 18.3 does not yet include type definitions for `ReactDOM.preload`, `ReactDOM.preconnect`, and `ReactDOM.prefetchDNS`. You can use `// @ts-ignore` as a temporary solution to avoid type errors.
Copy link
Member

@eps1lon eps1lon Apr 27, 2024

Choose a reason for hiding this comment

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

This whole line is obsolete now. The types have been available for a while now. We can delete the line instead.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@eps1lon Oh wow, great catch, thanks. 馃憤 I've now made those amendments 馃憠 312b559

@eps1lon eps1lon added the CI approved Approve running CI for fork label Apr 29, 2024
@eps1lon eps1lon merged commit 15f7418 into vercel:canary Apr 29, 2024
34 of 35 checks passed
@eps1lon
Copy link
Member

eps1lon commented Apr 29, 2024

Thank you!

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 13, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
CI approved Approve running CI for fork Documentation Related to Next.js' official documentation. locked
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Docs: Resource Hints section contains ReactDOM.prefetchDNS method typo
3 participants