(props: SSRProviderProps)
| 85 | * This ensures that auto generated ids are consistent between the client and server. |
| 86 | */ |
| 87 | export function SSRProvider(props: SSRProviderProps): JSX.Element { |
| 88 | // oxlint-disable-next-line react/react-compiler |
| 89 | if (typeof React['useId'] === 'function') { |
| 90 | if ( |
| 91 | process.env.NODE_ENV !== 'test' && |
| 92 | process.env.NODE_ENV !== 'production' && |
| 93 | !warnedAboutSSRProvider |
| 94 | ) { |
| 95 | console.warn( |
| 96 | 'In React 18, SSRProvider is not necessary and is a noop. You can remove it from your app.' |
| 97 | ); |
| 98 | // oxlint-disable-next-line react/react-compiler |
| 99 | warnedAboutSSRProvider = true; |
| 100 | } |
| 101 | return <>{props.children}</>; |
| 102 | } |
| 103 | return <LegacySSRProvider {...props} />; |
| 104 | } |
| 105 | |
| 106 | let canUseDOM = Boolean( |
| 107 | typeof window !== 'undefined' && window.document && window.document.createElement |
nothing calls this directly
no outgoing calls
no test coverage detected