mirror of
https://github.com/vercel/next.js.git
synced 2026-09-20 02:25:18 +08:00
4c3b7f9b7a
A continuation of #51864 with RedirectType used in an e2e test and some ts-ignores removed from the codebase. Happy to split it into two PRs but I left comments in the two consequential files ---------
14 lines
404 B
TypeScript
14 lines
404 B
TypeScript
'use client'
|
|
|
|
import ReactDOM from 'react-dom'
|
|
|
|
// NOTE: atm preload/prefetch/prefetchDNS are only supported in the SSR and client, not in RSC yet
|
|
export default function Client() {
|
|
ReactDOM.preload('/api/preload', { as: 'script' })
|
|
// @ts-ignore
|
|
ReactDOM.preconnect('/preconnect-url', { crossOrigin: 'use-credentials' })
|
|
// @ts-ignore
|
|
ReactDOM.prefetchDNS('/dns-prefetch-url')
|
|
return null
|
|
}
|