Is it safe to use ReactDOM.createPortal() with document.body? : <p>I understand that <a href="https://medium.com/@dan_abramov/two-weird-tricks-that-fix-react-7cf9bbdef375" rel="noreferrer">it's probably a bad idea</a> to <a href="https://reactjs.org/docs/react-dom.html#render" rel="noreferrer"><code>ReactDOM.render()</code></a> into <code>document.body</code>. But are there any issues with using <a href="https://reactjs.org/docs/portals.html" rel="noreferrer"><code>ReactDOM.createPortal()</code></a> with <code>document.body</code>?</p>

<p>Tried looking for examples of React going bonkers when you render into body so I could test it out with createPortal but I wasn't able to find any.</p>

<p>To put things into context, here's a sample usage I'm speaking about:</p>

<pre><code>import React from 'react';
import ReactDOM from 'react-dom';

export default class Modal extends React.Component {
    render() {
        return ReactDOM.createPortal(
            &lt;div className='modalContainer'&gt;
                &lt;div className='modalBox'&gt;
                    {this.props.children}
                &lt;/div&gt;
            &lt;/div&gt;,
            document.body
        );
    }
}
</code></pre>

<p>Haven't run into any issues with this pattern but I'd like to know if there are consequences as I start adding more libraries.</p>
