Skip to content
This repository was archived by the owner on Sep 23, 2023. It is now read-only.
This repository was archived by the owner on Sep 23, 2023. It is now read-only.

unmount/remove DireflowComponent  #276

@hirenreshamwala

Description

@hirenreshamwala

Hi,

I want to add/remove web component on demand in my HTML file.

I created a component <demo-button>

//Add
document.body.append('<demo-button id="button1">');

//Remove
document.body.removeChild(document.getElementById('button1'))

This code is adding my component and removing it properly but it shows the following error in the console

Warning: unmountComponentAtNode(): The node you're attempting to unmount was rendered by another copy of React.

some forum says I need to unmount it from the react component. But I don't know exactly what I need to do.

Can anyone guide me?

Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions