dillon1000/react

Commit

[Float][Fizz][Fiber] implement preconnect and prefetchDNS float methods (#26237)

Adds two new ReactDOM methods

### `ReactDOM.prefetchDNS(href: string)`
In SSR this method will cause a `<link rel="dns-prefetch" href="..." />`
to flush before most other content both on intial flush (Shell) and late
flushes. It will only emit one link per href.

On the client, this method will case the same kind of link to be
inserted into the document immediately (when called during render, not
during commit) if there is not already a matching element in the
document.

### `ReactDOM.preconnect(href: string, options?: { crossOrigin?: string
})`
In SSR this method will cause a `<link rel="dns-prefetch" href="..."
[corssorigin="..."] />` to flush before most other content both on
intial flush (Shell) and late flushes. It will only emit one link per
href + crossorigin combo.

On the client, this method will case the same kind of link to be
inserted into the document immediately (when called during render, not
during commit) if there is not already a matching element in the
document.
Browse files
Changed paths10 files
First-parent comparison
M packages/react-dom-bindings/src/client/ReactDOMFloatClient.js ModifiedM packages/react-dom-bindings/src/server/ReactDOMServerFormatConfig.js ModifiedM packages/react-dom-bindings/src/shared/ReactDOMFloat.js ModifiedM packages/react-dom/index.classic.fb.js ModifiedM packages/react-dom/index.experimental.js ModifiedM packages/react-dom/index.js ModifiedM packages/react-dom/index.modern.fb.js ModifiedM packages/react-dom/index.stable.js ModifiedM packages/react-dom/src/__tests__/ReactDOMFloat-test.js ModifiedM packages/react-dom/src/client/ReactDOM.js Modified
Patch

Files changed

Rendering syntax-highlighted changes…