Skip to content

Commit f97abe0

Browse files
authored
ref: remove deprecated usage of unmountComponentAtNode to support react 19 (#379)
1 parent 3778cb8 commit f97abe0

File tree

3 files changed

+0
-9
lines changed

3 files changed

+0
-9
lines changed

packages/react/src/components/lumino/Lumino.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
*/
66

77
import { useRef, useEffect } from 'react';
8-
import { unmountComponentAtNode } from 'react-dom';
98
import { Widget } from '@lumino/widgets';
109

1110
type LuminoProps = {
@@ -26,7 +25,6 @@ export const Lumino = (props: LuminoProps) => {
2625
}
2726
return () => {
2827
try {
29-
unmountComponentAtNode(children.node);
3028
if (children.isAttached || children.node.isConnected) {
3129
children.dispose();
3230
Widget.detach(children);

packages/react/src/components/lumino/LuminoBox.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
*/
66

77
import { useRef, useEffect } from 'react';
8-
import { unmountComponentAtNode } from 'react-dom';
98
import { Widget, BoxPanel } from '@lumino/widgets';
109
import { Box } from '@primer/react';
1110

@@ -30,7 +29,6 @@ export const LuminoBox = (props: LuminoBoxProps) => {
3029
}
3130
return () => {
3231
try {
33-
unmountComponentAtNode(boxPanel.node);
3432
if (boxPanel.isAttached || boxPanel.node.isConnected) {
3533
boxPanel.dispose();
3634
Widget.detach(boxPanel);

packages/react/src/components/lumino/ReactPortalWidget.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,6 @@ export abstract class ReactPortalWidget extends Widget {
5454
*/
5555
protected onBeforeDetach(msg: Message): void {
5656
// Unmount the component so it can tear down.
57-
// TODO unmountComponentAtNode or not?
58-
// console.js:213 Warning: unmountComponentAtNode():
59-
// The node you're attempting to unmount was rendered by React and is not a top-level container.
60-
// Instead, have the parent component update its state and rerender in order to remove this component.
61-
// ReactDOM.unmountComponentAtNode(this.node);
6257
}
6358

6459
/**

0 commit comments

Comments
 (0)