title: How to display Modal component on page load?
body: <p>I'm making an HTML5 game page and wanted to have my login form be a modal when the user loads the page. I have set the state to true and tried moving the state to app.js but neither works</p>
  
  <pre><code>export default class Modal extends Component {
    state = { show: true };
  
    showModal = () =&gt; {
      this.setState({ show: true });
    };
  
    hideModal = () =&gt; {
      this.setState({ show: false });
    };
  
    render() {
      return (
        &lt;div className="modal"&gt;
          &lt;section className="modal-main"&gt;
            &lt;Login username={this.props.username} email={this.props.email} password={this.props.password} /&gt;
            &lt;button onClick={this.hideModal}&gt;close&lt;/button&gt;
          &lt;/section&gt;
        &lt;/div&gt;
      );
    }
  }
  </code></pre>
  
  <p>I have the modal imported into app.js but it still is not loading.</p>