Update error messages (#28652)

## Overview

The error messages that say:

> ReactDOM.hydrate is no longer supported in React 18

Don't make sense in the React 19 release. Instead, they should say:

> ReactDOM.hydrate was removed in React 19.

For legacy mode, they should say:

> ReactDOM.hydrate has not been supported since React 18.
This commit is contained in:
Ricky
2024-03-26 17:25:53 -04:00
committed by GitHub
parent f24cf4a1af
commit dbfbfb3312
21 changed files with 124 additions and 65 deletions

View File

@@ -17,10 +17,13 @@ module.exports = function shouldIgnoreConsoleError(
return true;
}
if (
format.indexOf('ReactDOM.render is no longer supported in React 18') !==
-1 ||
format.indexOf('ReactDOM.render was removed in React 19') !== -1 ||
format.indexOf('ReactDOM.hydrate was removed in React 19') !== -1 ||
format.indexOf(
'ReactDOM.hydrate is no longer supported in React 18'
'ReactDOM.render has not been supported since React 18'
) !== -1 ||
format.indexOf(
'ReactDOM.hydrate has not been supported since React 18'
) !== -1
) {
// We haven't finished migrating our tests to use createRoot.