adobe / react-webcomponent

This projects automates the wrapping of a React component in a CustomElement.
Apache License 2.0
105 stars 19 forks source link

Clean up div after component is unmounted #12

Closed cuberoot closed 5 years ago

cuberoot commented 5 years ago

Fix web components that are mounted into a container so that they clean up the div that they create.

Description

Remove the div that is created when the web component in unmounted

Related Issue

https://github.com/adobe/react-webcomponent/issues/11

Motivation and Context

I have a case where I am mounting/unmounting a component (popover) and the divs are piling up.

How Has This Been Tested?

See the test that I added in the PR to detect this. It fails without my change to WebComponent

Types of changes

Checklist:

alexmirea commented 5 years ago

Thanks for the contribution @cuberoot