Skip to content

Commit

Permalink
Rename createSyncRoot in warning
Browse files Browse the repository at this point in the history
  • Loading branch information
sebmarkbage committed Oct 19, 2019
1 parent d41a06e commit d12a60b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ describe('ReactDOMServerPartialHydration', () => {
}).toWarnDev(
'Warning: Cannot hydrate Suspense in legacy mode. Switch from ' +
'ReactDOM.hydrate(element, container) to ' +
'ReactDOM.unstable_createSyncRoot(container, { hydrate: true })' +
'ReactDOM.createSyncRoot(container, { hydrate: true })' +
'.render(element) or remove the Suspense components from the server ' +
'rendered components.' +
'\n in Suspense (at **)' +
Expand Down
2 changes: 1 addition & 1 deletion packages/react-reconciler/src/ReactFiberBeginWork.js
Original file line number Diff line number Diff line change
Expand Up @@ -1972,7 +1972,7 @@ function mountDehydratedSuspenseComponent(
false,
'Cannot hydrate Suspense in legacy mode. Switch from ' +
'ReactDOM.hydrate(element, container) to ' +
'ReactDOM.unstable_createSyncRoot(container, { hydrate: true })' +
'ReactDOM.createSyncRoot(container, { hydrate: true })' +
'.render(element) or remove the Suspense components from ' +
'the server rendered components.',
);
Expand Down

0 comments on commit d12a60b

Please sign in to comment.