Open
Description
When I am using portal component in a non browser environment, element in here is null:
const [ele] = React.useState(() => {
if (!canUseDom()) {
return null;
}
And then this code fails because ele is null:
function cleanup() {
ele.parentElement?.removeChild(ele);
appendedRef.current = false;
}
Metadata
Metadata
Assignees
Labels
No labels