title: How to open a Component in an onPress call?
body: <p>So basically I have a Screen in my app that has a Button in it and this button should open a Modal that is also a selfmade component in the same screen js file. </p>
  
  <p>I am setting the state visible in the screen and the button has an onPress handler that toggles the visible state (false/true). </p>
  
  <p>I dont know how to display my own modalComponent when the button is clicked.</p>
  
  <p>btw using react-native-modal</p>
  
  <p>Own modal component: </p>
  
  <pre><code>class PhasenModal extends Component {
    render() {
      return (
        &lt;View&gt;
          &lt;Modal isVisible={this.props.visible}&gt;
            &lt;View style={{ flex: 1 }}&gt;
              &lt;Text&gt;I am a modal&lt;/Text&gt;
            &lt;/View&gt;
          &lt;/Modal&gt;
        &lt;/View&gt;
      );
    }
  }
  </code></pre>
  
  <p>In my ScreenView : </p>
  
  <pre><code>&lt;Button
    buttonStyle={styles.phaseButton}
    title="Choose"
    onPress={() =&gt; this.phasenModalHandler()}
  /&gt;
  </code></pre>
  
  <p>The onPress fnct: </p>
  
  <pre><code>phasenModalHandler() {
    this.setState({ visible: !this.state.visible });
    if (this.state.visible) {
      return &lt;PhasenModal visible={this.state.visible} /&gt;;
    } else {
      return;
    }
  }
  </code></pre>
  
  <p>I expect the button to show the Modal but it doesnt show anything ,
  the state gets toggled correctly tho it switched from false to true.</p>
  
  <p>I guess my onPress fctn is wrong becaus I dont know how to render the component.</p>
  
  <p>Thank you in advance.</p>