const rootDomElement: any = document.getElementById('root');
const newBlock = (
<div>
<p>The New Content</>
</div>
);
ReactDOM.createPortal(newBlock, rootDomElement);
// you can return it too
// return ReactDOM.createPortal(PDFPopup, RootDomElement);
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter