Skip to content

Commit

Permalink
Update errors
Browse files Browse the repository at this point in the history
  • Loading branch information
sebmarkbage committed Mar 27, 2024
1 parent 65607a8 commit 56874ae
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions packages/react-dom/src/client/ReactDOMRootFB.js
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,7 @@ function noopOnRecoverableError() {
// legacy API.
}


function legacyCreateRootFromDOMContainer(
container: Container,
initialChildren: ReactNodeList,
Expand Down Expand Up @@ -338,14 +339,14 @@ export function render(
if (disableLegacyMode) {
if (__DEV__) {
console.error(
'ReactDOM.render is no longer supported in React 18. Use createRoot instead.',
'ReactDOM.render was removed in React 19. Use createRoot instead.',
);
}
throw new Error('ReactDOM: Unsupported Legacy Mode API.');
}
if (__DEV__) {
console.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 @@ -386,15 +387,15 @@ export function unstable_renderSubtreeIntoContainer(
if (disableLegacyMode) {
if (__DEV__) {
console.error(
'ReactDOM.unstable_renderSubtreeIntoContainer() is no longer supported in React 18. Consider using a portal instead.',
'ReactDOM.unstable_renderSubtreeIntoContainer() was removed in React 19. Consider using a portal instead.',
);
}
throw new Error('ReactDOM: Unsupported Legacy Mode API.');
}
if (__DEV__) {
console.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

0 comments on commit 56874ae

Please sign in to comment.