title: React Native: How can I put a pop-up Modal into flatlist
body: <p>I've made a flatlist with a few data inside. I want to make a pop-up information for each item in the flatlist. So I tried putting Modal into the renderItem function but when it sets the modal state visible, it will show all of the information in my flatlist. I think it should be setting the modal visible state by id or something like that but I don't know how to do it. Any suggestion?</p>
  <p>my renderItem:</p>
  <pre><code> function RenderItem({ item }) {
      return (
          &lt;View&gt;
              &lt;Modal
                  animationType='slide'
                  transparent={true}
                  visible={infoModal}&gt;
                  &lt;View style={styles.informationContainer}&gt;
                      &lt;View style={styles.informationBox}&gt;
                          &lt;Text&gt;{item.file.displayName}&lt;/Text&gt;
                          &lt;Button title='         OK         ' onPress={() =&gt; setInfoModal(false)} /&gt;
  
                      &lt;/View&gt;
                  &lt;/View&gt;
              &lt;/Modal&gt;
              &lt;TouchableOpacity style={styles.listBox} onPress={() =&gt; setInfoModal(true)}&gt;
                  &lt;View&gt;
                      &lt;Text numberOfLines={1} style={styles.listText}&gt;{item.file.displayName}&lt;/Text&gt;
                      &lt;Text style={{ width: 200, color: 'rgba(0, 0, 0, 0.5)' }}&gt;{item.certificateName}&lt;/Text&gt;
                  &lt;/View&gt;
                  &lt;View style={{ flexDirection: 'row', justifyContent: 'center' }}&gt;
                      &lt;TouchableOpacity&gt;
                          &lt;Icon name='search' color='black' size={25} /&gt;
                      &lt;/TouchableOpacity&gt;
                      &lt;Text&gt;       &lt;/Text&gt;
                      &lt;TouchableOpacity onPress={() =&gt; handleDownload(item)}&gt;
                          &lt;Icon name='download' color='black' size={25} /&gt;
                      &lt;/TouchableOpacity&gt;
                      &lt;Text&gt;   &lt;/Text&gt;
                  &lt;/View&gt;
              &lt;/TouchableOpacity&gt;
          &lt;/View&gt;
      )
  }
  </code></pre>