title: TouchableOpacity and button not working in react native Modal?
body: <p>I have created react native modal but TouchableOpacity and button doesn't get clicked when the user tries to click on it why so?</p>
  
  <p>code: (part 1)</p>
  
  <pre><code>&lt;Modal
            animationType="slide"
            transparent={false}
            visible={this.state.modalVisible}
            onRequestClose={() =&gt; {
              Alert.alert('Modal has been closed.');
            }}&gt;
            &lt;View style={{marginTop: 22}}&gt;
              &lt;View&gt;
                &lt;FilterScreen/&gt;
                &lt;TouchableHighlight
                  onPress={() =&gt; 
                    this._setModalVisible(!this.state.modalVisible)
                  }&gt;
                  &lt;Text&gt;Hide Modal&lt;/Text&gt;
                &lt;/TouchableHighlight&gt;
              &lt;/View&gt;
            &lt;/View&gt;
          &lt;/Modal&gt;
  </code></pre>
  
  <p>FilterScreen component: </p>
  
  <pre><code>return(
     &lt;View&gt;
        &lt;TouchableOpacity&gt;
             &lt;Text&gt;Inside Filter screen&lt;/Text&gt;
        &lt;/TouchableOpacity&gt;
      &lt;/View&gt;
  )
  </code></pre>
  
  <p>In the above code, I have added FilterScreen component which has touchableOpacity inside it but when modal opens up I am not able to click on toucableopacity component it only displays it in modal but onClick not working.</p>
  
  <p>Code: (part 2)</p>
  
  <pre><code>&lt;Modal
            animationType="slide"
            transparent={false}
            visible={this.state.modalVisible}
            onRequestClose={() =&gt; {
              Alert.alert('Modal has been closed.');
            }}&gt;
            &lt;View style={{marginTop: 22}}&gt;
              &lt;View&gt;
                 &lt;TouchableOpacity&gt;
                   &lt;Text&gt;Inside Filter screen&lt;/Text&gt;
                 &lt;/TouchableOpacity&gt;
                &lt;TouchableHighlight
                  onPress={() =&gt; 
                    this._setModalVisible(!this.state.modalVisible)
                  }&gt;
                  &lt;Text&gt;Hide Modal&lt;/Text&gt;
                &lt;/TouchableHighlight&gt;
              &lt;/View&gt;
            &lt;/View&gt;
          &lt;/Modal&gt;
  </code></pre>
  
  <p>Above code runs if I add touchableOpacity inside Modal but same code inside filterscreen doesn't work by adding component why so? </p>
  
  <p>Note: part 1 doesn't work but part 2 code works why so?</p>