title: React Native - Use a keyExtractor with FlatList
body: <p>I have been getting the: </p>
  
  <pre><code>"VirtualizedList: missing keys for items, make sure to specify a key property on an item or provide a custom keyExtractor"
  </code></pre>
  
  <p>pretty confusing..., the array i am passing it has a key property defined in each object in the array. I have that array defined in this.state. I ran a quick print out in the console to be sure:
  <a href="https://i.stack.imgur.com/bkzI4.png" rel="noreferrer">print out of array</a></p>
  
  <p>Each object in array is defined as:</p>
  
  <pre><code>  var obj = {key: doc.id, value: doc.data()};
  </code></pre>
  
  <p>(doc and data being from another part of my app, but I know doc.id is unique)</p>
  
  <p>After some googling I then tried to define a Key Extractor like so:</p>
  
  <pre><code>_keyExtractor = (item, index) =&gt; item.key;
  </code></pre>
  
  <p>and then here is my flatlist definition:</p>
  
  <pre><code>  &lt;FlatList
          style={{}}
          data={this.state.FeedDataCollection}
          keyExtractor={this._keyExtractor}
          renderItem={(rowData) =&gt;this.RenderFeedCard(rowData)}
        /&gt;
  </code></pre>
  
  <p>Still receiving the same error, at this point not really sure how to handle this or what it is doing wrong. Any Ideas? Thanks so much!</p>