react-polyfill-portal
v1.1.0
Published
React createPortal polyfill
Downloads
49
Maintainers
Readme
react-polyfill-portal
Polyfill for React new portal api
Support
Usage
import { createPortal } from 'react-polyfill-portal';
function Portal() {
return createPortal(props.children, document.body);
}
function App() {
return (
<div>
<Portal>
<p>text</p>
</Portal>
</div>
);
}
For more usage, see https://reactjs.org/docs/portals.html