We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 56efb2e commit 1a6d36bCopy full SHA for 1a6d36b
packages/react-dom/src/client/ReactDOMLegacy.js
@@ -396,6 +396,14 @@ export function unstable_renderSubtreeIntoContainer(
396
}
397
398
export function unmountComponentAtNode(container: Container): boolean {
399
+ if (disableLegacyMode) {
400
+ if (__DEV__) {
401
+ console.error(
402
+ 'unmountComponentAtNode is no longer supported in React 18. Use root.unmount() instead.',
403
+ );
404
+ }
405
+ throw new Error('ReactDOM: Unsupported Legacy Mode API.');
406
407
if (!isValidContainerLegacy(container)) {
408
throw new Error('Target container is not a DOM element.');
409
0 commit comments