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

@@ -2159,7 +2159,7 @@ describe('InspectedElement', () => {
const container = document.createElement('div');
container.innerHTML = '<div></div>';
withErrorsOrWarningsIgnored(
['ReactDOM.hydrate is no longer supported in React 18'],
['ReactDOM.hydrate has not been supported since React 18'],
() => {
ReactDOM.hydrate(<Example />, container);
},

View File

@@ -151,7 +151,7 @@ export function getLegacyRenderImplementation(): RenderImplementation {
function render(elements) {
withErrorsOrWarningsIgnored(
['ReactDOM.render is no longer supported in React 18'],
['ReactDOM.render has not been supported since React 18'],
() => {
ReactDOM.render(elements, container);
},
@@ -340,7 +340,7 @@ export function legacyRender(elements, container) {
const ReactDOM = require('react-dom');
withErrorsOrWarningsIgnored(
['ReactDOM.render is no longer supported in React 18'],
['ReactDOM.render has not been supported since React 18'],
() => {
ReactDOM.render(elements, container);
},