title: Open new tabs with portal react
body: <p>Im trying to open a new tab with portal, the problem is that the tab not display the content that i want to get a prev, i follow this <a href="https://hackernoon.com/using-a-react-16-portal-to-do-something-cool-2a2d627b0202" rel="nofollow noreferrer">post</a> and the tab open perfectly, but not display the content and look like this:
  <a href="https://i.stack.imgur.com/eb65C.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/eb65C.png" alt="enter image description here"></a></p>
  
  <p>This is my react portal code:</p>
  
  <pre><code>    import ReactDOM, {PureComponent} from 'react';
  
  export default class Portal extends PureComponent{
    constructor(props) {
      super(props);
      this.containerEl = null;
      this.externalWindow = null;
    }
  
    componentDidMount() {
      this.externalWindow = window.open('', '', 'width=600,height=400,left=200,top=200');
      this.containerEl = this.externalWindow.document.createElement('div');
      this.externalWindow.document.body.appendChild(this.containerEl);
    }
  
    componentWillUnmount() {
  
      this.externalWindow.close();
    }
  
    render() {
      if (!this.containerEl) {
        return null;
      } 
      return ReactDOM.createPortal(this.props.children,this.containerEl);  
    }
  }
  </code></pre>
  
  <p>And this is my code where im opening the new tab:</p>
  
  <pre><code>{this.state.showWindowPortal &amp;&amp; (
              &lt;Portal closeWindowPortal={this.closeWindowPortal} &gt;
              &lt;p&gt;Hello&lt;/p&gt;
         &lt;button onClick={() =&gt; this.closeWindowPortal()} &gt;Close me! 
    &lt;/button&gt;
  &lt;/Portal&gt;)}
  </code></pre>
  
  <p>I hope you guys can help me, thanks!</p>