FlatList vs map react-native : <p>I have recently started using <code>react-native</code> and have come across the <code>FlatList</code> component. When using <code>react</code> I have always used <code>map</code> with an array. </p>

<p>I was using <code>FlatList</code> but there was issues when I wanted to change the <code>flex-direction</code> of items in the <code>FlatList</code> so I reverted to using <code>map</code>.</p>

<p>Here are the two examples using both methods:</p>

<p><code>map</code></p>

<pre><code>{
    this.state.images.map(image =&gt; {
       return (
          &lt;UsersImage key={ image } source={{ uri: image }} /&gt;
        )
    })
}
</code></pre>

<p><code>FlatList</code></p>

<pre><code>&lt;FlatList
    data={ this.state.images }
    renderItem={({item}) =&gt; {
        return (
            &lt;UsersImage source={{ uri: item }} /&gt;
        )
    }}  
   keyExtractor={(item, index) =&gt; index}
/&gt;
</code></pre>

<p>Can anyone explain why one should use <code>FlatList</code> over <code>map</code> or vice versa?</p>
