title: Click listener in flatlist
body: <p>How can I add click listener in <code>Flatlist</code>?</p>
  
  <p>My code:</p>
  
  <pre><code>renderItem({item, index}){
      return &lt;View style = {{
      flex:1,
      margin: 5, 
      minWidth: 170, 
      maxWidth: 223,
      height: 304,
      maxHeight: 304,
      backgroundColor: '#ccc',
      }}/&gt;
  }
  render(){
  return(&lt;FlatList
  contentContainerStyle={styles.list}
  data={[{key: 'a'}, {key: 'b'},{key:'c'}]}
  renderItem={this.renderItem}
  /&gt;);
  }
  }
  </code></pre>
  
  <p>Update 1: I used button but it is not working in <code>Flatlist</code>. However using only button instead of <code>Flatlist</code>, it works. Why is it not working in <code>Flatlist</code> renderItem?</p>
  
  <pre><code>_listener = () =&gt; {
      alert("clicked");
  }
  
  renderItem({item, index}){
      return&lt;View&gt;
        &lt;Button
            title = "Button"
            color = "#ccc"
            onPress={this._listener}
        /&gt;
      &lt;/View&gt;
  }
  </code></pre>