title: returning components following setState
body: <p>I have the following code :</p>
  
  <pre><code>getModal = e =&gt; {
    this.setState(
      {
        name: e.name,
        game: e.packers
      },
      () =&gt; {
        return (&lt;Modal name={this.state.name} game={this.state.game} /&gt;);
      }
    );
  };
  data = {
    name: "jack sparrow",
    game: "packer wins"
  };
  
  setModal = () =&gt; {
    var a = popModal.show(this.getModal(data));
  };
  </code></pre>
  
  <p>I am unable to return the Modal component. I don't know if its syntactically correct or not. When I click a button the setModal gets activated . I am able to get console results but returning a component has not been possible. What am i doing wrong here?</p>