Skip to content

Commit

Permalink
Update error messages (#28652)
Browse files Browse the repository at this point in the history
## 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.

DiffTrain build for [dbfbfb3](dbfbfb3)
  • Loading branch information
rickhanlonii committed Mar 26, 2024
1 parent 17f0c67 commit eb7de04
Show file tree
Hide file tree
Showing 14 changed files with 49 additions and 49 deletions.
2 changes: 1 addition & 1 deletion compiled/facebook-www/JSXDEVRuntime-dev.classic.js
Original file line number Diff line number Diff line change
Expand Up @@ -937,7 +937,7 @@ if (__DEV__) {
didWarnAboutElementRef[componentName] = true;

error(
"Accessing element.ref is no longer supported. ref is now a " +
"Accessing element.ref was removed in React 19. ref is now a " +
"regular prop. It will be removed from the JSX Element " +
"type in a future release."
);
Expand Down
2 changes: 1 addition & 1 deletion compiled/facebook-www/JSXDEVRuntime-dev.modern.js
Original file line number Diff line number Diff line change
Expand Up @@ -937,7 +937,7 @@ if (__DEV__) {
didWarnAboutElementRef[componentName] = true;

error(
"Accessing element.ref is no longer supported. ref is now a " +
"Accessing element.ref was removed in React 19. ref is now a " +
"regular prop. It will be removed from the JSX Element " +
"type in a future release."
);
Expand Down
2 changes: 1 addition & 1 deletion compiled/facebook-www/REVISION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
f24cf4a1af4e677dd85fce66001eee42b75b1cf7
dbfbfb3312db019183ef92fd2ef110cc7d807e80
4 changes: 2 additions & 2 deletions compiled/facebook-www/React-dev.classic.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ if (__DEV__) {
) {
__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error());
}
var ReactVersion = "19.0.0-www-classic-e98b6ae2";
var ReactVersion = "19.0.0-www-classic-5d26d7ce";

// ATTENTION
// When adding new symbols to this file,
Expand Down Expand Up @@ -1307,7 +1307,7 @@ if (__DEV__) {
didWarnAboutElementRef[componentName] = true;

error(
"Accessing element.ref is no longer supported. ref is now a " +
"Accessing element.ref was removed in React 19. ref is now a " +
"regular prop. It will be removed from the JSX Element " +
"type in a future release."
);
Expand Down
4 changes: 2 additions & 2 deletions compiled/facebook-www/React-dev.modern.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ if (__DEV__) {
) {
__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error());
}
var ReactVersion = "19.0.0-www-modern-655002dc";
var ReactVersion = "19.0.0-www-modern-d20fe227";

// ATTENTION
// When adding new symbols to this file,
Expand Down Expand Up @@ -1307,7 +1307,7 @@ if (__DEV__) {
didWarnAboutElementRef[componentName] = true;

error(
"Accessing element.ref is no longer supported. ref is now a " +
"Accessing element.ref was removed in React 19. ref is now a " +
"regular prop. It will be removed from the JSX Element " +
"type in a future release."
);
Expand Down
8 changes: 4 additions & 4 deletions compiled/facebook-www/ReactART-dev.modern.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ if (__DEV__) {
return self;
}

var ReactVersion = "19.0.0-www-modern-10ce85c5";
var ReactVersion = "19.0.0-www-modern-2edfe4d7";

var LegacyRoot = 0;
var ConcurrentRoot = 1;
Expand Down Expand Up @@ -12791,15 +12791,15 @@ if (__DEV__) {
{
if (ctor.childContextTypes) {
error(
"%s uses the legacy childContextTypes API which is no longer supported. " +
"%s uses the legacy childContextTypes API which was removed in React 19. " +
"Use React.createContext() instead.",
name
);
}

if (ctor.contextTypes) {
error(
"%s uses the legacy contextTypes API which is no longer supported. " +
"%s uses the legacy contextTypes API which was removed in React 19. " +
"Use React.createContext() with static contextType instead.",
name
);
Expand Down Expand Up @@ -15818,7 +15818,7 @@ if (__DEV__) {
{
if (Component.contextTypes) {
error(
"%s uses the legacy contextTypes API which is no longer supported. " +
"%s uses the legacy contextTypes API which was removed in React 19. " +
"Use React.createContext() with React.useContext() instead.",
getComponentNameFromType(Component) || "Unknown"
);
Expand Down
10 changes: 5 additions & 5 deletions compiled/facebook-www/ReactDOM-dev.classic.js
Original file line number Diff line number Diff line change
Expand Up @@ -35845,7 +35845,7 @@ if (__DEV__) {
return root;
}

var ReactVersion = "19.0.0-www-classic-cec25015";
var ReactVersion = "19.0.0-www-classic-7b93bfeb";

function createPortal$1(
children,
Expand Down Expand Up @@ -48494,7 +48494,7 @@ if (__DEV__) {
function hydrate(element, container, callback) {
{
error(
"ReactDOM.hydrate is no longer supported in React 18. Use hydrateRoot " +
"ReactDOM.hydrate has not been supported since React 18. Use hydrateRoot " +
"instead. Until you switch to the new API, your app will behave as " +
"if it's running React 17. Learn " +
"more: https://react.dev/link/switch-to-createroot"
Expand Down Expand Up @@ -48530,7 +48530,7 @@ if (__DEV__) {
function render(element, container, callback) {
{
error(
"ReactDOM.render is no longer supported in React 18. Use createRoot " +
"ReactDOM.render has not been supported since React 18. Use createRoot " +
"instead. Until you switch to the new API, your app will behave as " +
"if it's running React 17. Learn " +
"more: https://react.dev/link/switch-to-createroot"
Expand Down Expand Up @@ -48571,8 +48571,8 @@ if (__DEV__) {
) {
{
error(
"ReactDOM.unstable_renderSubtreeIntoContainer() is no longer supported " +
"in React 18. Consider using a portal instead. Until you switch to " +
"ReactDOM.unstable_renderSubtreeIntoContainer() has not been supported " +
"since React 18. Consider using a portal instead. Until you switch to " +
"the createRoot API, your app will behave as if it's running React " +
"17. Learn more: https://react.dev/link/switch-to-createroot"
);
Expand Down
8 changes: 4 additions & 4 deletions compiled/facebook-www/ReactDOM-dev.modern.js
Original file line number Diff line number Diff line change
Expand Up @@ -17922,15 +17922,15 @@ if (__DEV__) {
{
if (ctor.childContextTypes) {
error(
"%s uses the legacy childContextTypes API which is no longer supported. " +
"%s uses the legacy childContextTypes API which was removed in React 19. " +
"Use React.createContext() instead.",
name
);
}

if (ctor.contextTypes) {
error(
"%s uses the legacy contextTypes API which is no longer supported. " +
"%s uses the legacy contextTypes API which was removed in React 19. " +
"Use React.createContext() with static contextType instead.",
name
);
Expand Down Expand Up @@ -21158,7 +21158,7 @@ if (__DEV__) {
{
if (Component.contextTypes) {
error(
"%s uses the legacy contextTypes API which is no longer supported. " +
"%s uses the legacy contextTypes API which was removed in React 19. " +
"Use React.createContext() with React.useContext() instead.",
getComponentNameFromType(Component) || "Unknown"
);
Expand Down Expand Up @@ -35692,7 +35692,7 @@ if (__DEV__) {
return root;
}

var ReactVersion = "19.0.0-www-modern-b40caa87";
var ReactVersion = "19.0.0-www-modern-6d2d5280";

function createPortal$1(
children,
Expand Down
8 changes: 4 additions & 4 deletions compiled/facebook-www/ReactDOMServer-dev.modern.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ if (__DEV__) {
var React = require("react");
var ReactDOM = require("react-dom");

var ReactVersion = "19.0.0-www-modern-46a9d3dd";
var ReactVersion = "19.0.0-www-modern-139d7d17";

// This refers to a WWW module.
var warningWWW = require("warning");
Expand Down Expand Up @@ -9305,15 +9305,15 @@ if (__DEV__) {
{
if (ctor.childContextTypes) {
error(
"%s uses the legacy childContextTypes API which is no longer supported. " +
"%s uses the legacy childContextTypes API which was removed in React 19. " +
"Use React.createContext() instead.",
name
);
}

if (ctor.contextTypes) {
error(
"%s uses the legacy contextTypes API which is no longer supported. " +
"%s uses the legacy contextTypes API which was removed in React 19. " +
"Use React.createContext() with static contextType instead.",
name
);
Expand Down Expand Up @@ -11979,7 +11979,7 @@ if (__DEV__) {
{
if (Component.contextTypes) {
error(
"%s uses the legacy contextTypes API which is no longer supported. " +
"%s uses the legacy contextTypes API which was removed in React 19. " +
"Use React.createContext() with React.useContext() instead.",
getComponentNameFromType(Component) || "Unknown"
);
Expand Down
6 changes: 3 additions & 3 deletions compiled/facebook-www/ReactDOMServerStreaming-dev.modern.js
Original file line number Diff line number Diff line change
Expand Up @@ -9189,15 +9189,15 @@ if (__DEV__) {
{
if (ctor.childContextTypes) {
error(
"%s uses the legacy childContextTypes API which is no longer supported. " +
"%s uses the legacy childContextTypes API which was removed in React 19. " +
"Use React.createContext() instead.",
name
);
}

if (ctor.contextTypes) {
error(
"%s uses the legacy contextTypes API which is no longer supported. " +
"%s uses the legacy contextTypes API which was removed in React 19. " +
"Use React.createContext() with static contextType instead.",
name
);
Expand Down Expand Up @@ -11860,7 +11860,7 @@ if (__DEV__) {
{
if (Component.contextTypes) {
error(
"%s uses the legacy contextTypes API which is no longer supported. " +
"%s uses the legacy contextTypes API which was removed in React 19. " +
"Use React.createContext() with React.useContext() instead.",
getComponentNameFromType(Component) || "Unknown"
);
Expand Down
10 changes: 5 additions & 5 deletions compiled/facebook-www/ReactDOMTesting-dev.classic.js
Original file line number Diff line number Diff line change
Expand Up @@ -36469,7 +36469,7 @@ if (__DEV__) {
return root;
}

var ReactVersion = "19.0.0-www-classic-77ffc35e";
var ReactVersion = "19.0.0-www-classic-7628a4df";

function createPortal$1(
children,
Expand Down Expand Up @@ -49250,7 +49250,7 @@ if (__DEV__) {
function hydrate(element, container, callback) {
{
error(
"ReactDOM.hydrate is no longer supported in React 18. Use hydrateRoot " +
"ReactDOM.hydrate has not been supported since React 18. Use hydrateRoot " +
"instead. Until you switch to the new API, your app will behave as " +
"if it's running React 17. Learn " +
"more: https://react.dev/link/switch-to-createroot"
Expand Down Expand Up @@ -49286,7 +49286,7 @@ if (__DEV__) {
function render(element, container, callback) {
{
error(
"ReactDOM.render is no longer supported in React 18. Use createRoot " +
"ReactDOM.render has not been supported since React 18. Use createRoot " +
"instead. Until you switch to the new API, your app will behave as " +
"if it's running React 17. Learn " +
"more: https://react.dev/link/switch-to-createroot"
Expand Down Expand Up @@ -49327,8 +49327,8 @@ if (__DEV__) {
) {
{
error(
"ReactDOM.unstable_renderSubtreeIntoContainer() is no longer supported " +
"in React 18. Consider using a portal instead. Until you switch to " +
"ReactDOM.unstable_renderSubtreeIntoContainer() has not been supported " +
"since React 18. Consider using a portal instead. Until you switch to " +
"the createRoot API, your app will behave as if it's running React " +
"17. Learn more: https://react.dev/link/switch-to-createroot"
);
Expand Down
8 changes: 4 additions & 4 deletions compiled/facebook-www/ReactDOMTesting-dev.modern.js
Original file line number Diff line number Diff line change
Expand Up @@ -18059,15 +18059,15 @@ if (__DEV__) {
{
if (ctor.childContextTypes) {
error(
"%s uses the legacy childContextTypes API which is no longer supported. " +
"%s uses the legacy childContextTypes API which was removed in React 19. " +
"Use React.createContext() instead.",
name
);
}

if (ctor.contextTypes) {
error(
"%s uses the legacy contextTypes API which is no longer supported. " +
"%s uses the legacy contextTypes API which was removed in React 19. " +
"Use React.createContext() with static contextType instead.",
name
);
Expand Down Expand Up @@ -21295,7 +21295,7 @@ if (__DEV__) {
{
if (Component.contextTypes) {
error(
"%s uses the legacy contextTypes API which is no longer supported. " +
"%s uses the legacy contextTypes API which was removed in React 19. " +
"Use React.createContext() with React.useContext() instead.",
getComponentNameFromType(Component) || "Unknown"
);
Expand Down Expand Up @@ -36316,7 +36316,7 @@ if (__DEV__) {
return root;
}

var ReactVersion = "19.0.0-www-modern-fa53bc70";
var ReactVersion = "19.0.0-www-modern-6d858044";

function createPortal$1(
children,
Expand Down
4 changes: 2 additions & 2 deletions compiled/facebook-www/ReactServer-dev.modern.js
Original file line number Diff line number Diff line change
Expand Up @@ -1020,7 +1020,7 @@ if (__DEV__) {
didWarnAboutElementRef[componentName] = true;

error(
"Accessing element.ref is no longer supported. ref is now a " +
"Accessing element.ref was removed in React 19. ref is now a " +
"regular prop. It will be removed from the JSX Element " +
"type in a future release."
);
Expand Down Expand Up @@ -2818,7 +2818,7 @@ if (__DEV__) {
console["error"](error);
};

var ReactVersion = "19.0.0-www-modern-af1ea747";
var ReactVersion = "19.0.0-www-modern-a9a0f417";

// Patch fetch
var Children = {
Expand Down
Loading

0 comments on commit eb7de04

Please sign in to comment.