How to close the modal in react native : <p>I am newbie to react native developing. I want to close the modal component on pressing outside the modal in reactnative. Below is my code.</p>

<pre><code>state = {
    visibleModal : false,
};

_hideModal(){
  this.setState({
    visibleModal: true,
  })
}


render(){
    return(
        &lt;View style={
            [styles.container,
                {backgroundColor: this.state.visibleModal ? 'rgba(47, 60, 73, 0.75)': 'white'}
            ]}&gt;

            &lt;Text&gt;Text Behind Modal&lt;/Text&gt;

            { this._renderButton('BUTTON', () =&gt; this.setState({ visibleModal: true}) ) }
            &lt;TouchableWithoutFeedback onPress={() =&gt; {this._hideModal()}}&gt;
            &lt;Modal animationType={"slide"}
                   transparent={true}
                   visible={this.state.visibleModal}&gt;

                      &lt;View style={styles.modalContent}&gt;
                          &lt;Row /&gt;
                      &lt;/View&gt;

            &lt;/Modal&gt;
          &lt;/TouchableWithoutFeedback&gt;
        &lt;/View&gt;
    );
}
</code></pre>

<p>}</p>
