README
yarn add @smashing/portal
Usage
import {Portal} from "@smashing/portal"
export default () => (
<div>
App content...
<Portal>Content moved outside of react tree.</Portal>
</div>
)
Component utility to help with the ReactDOM.createPortal API.
<script type="module">
import smashingPortal from 'https://cdn.skypack.dev/@smashing/portal';
</script>
yarn add @smashing/portal
import {Portal} from "@smashing/portal"
export default () => (
<div>
App content...
<Portal>Content moved outside of react tree.</Portal>
</div>
)