Consider a case you want to attach a child component someplace other than current component.
npm i react-provided-portal
<Portal
selector="test-container"
didMount={parent => console.log('component mounted!')}
willUnmount={() => console.log('component unmounted!')}
>
<div>hello-world</div>
</Portal>
const TestComponent