-
Notifications
You must be signed in to change notification settings - Fork 27.7k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
docs: Fix typo for ReactDOM.prefetchDNS
method inside Resource Hints section
#65111
Conversation
Fixed a typo that incorrectly stated the existence of ReactDOM.preconnectDNS when it should be declared as ReactDOM.prefetchDNS instead.
Allow CI Workflow Run
Note: this should only be enabled once the PR is ready to go and can only be enabled by a maintainer |
Allow CI Workflow Run
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. |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you! |
Closes #65110
Fixed a typo inside the Resource Hints section that incorrectly stated the existence of
ReactDOM.preconnectDNS
when it should be declared asReactDOM.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)