title: react native change color one item in FlatList after click item (instagram like)
body: <p>react native change color one item in FlatList after click item</p>
  
  <pre><code>&lt;FlatList
        data={this.state.posts}
        renderItem={this.renderItem.bind(this)}
        keyExtractor={(item, index) =&gt; index}
        ListEmptyComponent={()=&gt; &lt;Spinner /&gt;}
        onEndReached={this.handleLoadMore.bind(this)}
        onEndReachedThreshold={0.5}
        initialNumToRender={1}
  /&gt;
  </code></pre>
  
  <p>after render list click on item and change color item:</p>
  
  <pre><code>renderItem({item}){
  return (
  &lt;Button transparent&gt;
     &lt;TouchableOpacity
         onPress={()=&gt;this.likeSave(item.id) }
     &gt;
     &lt;Icon name="heart" size={30} style={{color:likeColor}} /&gt;
      &lt;/TouchableOpacity&gt;
  &lt;/Button&gt;
  }
  </code></pre>
  
  <p>after click Icon heart change color Icon heart to red </p>