title: I am using Flatlist, I have 2 different components such as FriendsChat and EmptyChat
body: <p>I am using Flatlist, I have 2 different components such as FriendsChat and EmptyChat. When I hit the particular list value it should go either one, this is working properly but Only Friend Item component has it value but Empty chat component couldn't get that value. It shows undefined</p>
  <pre><code>Friends = () =&gt; (
      &lt;View style={[styles.container]}&gt;
        &lt;FlatList
          style={styles.setListStyle}
          data={this.props.searchQuery == '' ? this.props.friendsList : this.props.searchList}
          refreshing={false}
          keyExtractor={item =&gt; item.name}
          listKey={listKey}
          renderItem={itemData =&gt; (
            &lt;SafeAreaView forceInset={{ bottom: 'never', top: 'never' }}&gt;
              {console.log(&quot;Friend list console  &quot;+itemData.item.name)}
              &lt;ChatItem
                ChatItem={itemData.item}
                view={Strings.friends}
                addFriend={this.props.addFriend}
                onTouch={() =&gt; 
                  !this.props.addFriend &amp;&amp;
                  this.onTouchChat(itemData.item) &amp;&amp;
                  this.loadEmptyChat(itemData.item) &amp;&amp;
                  &lt;EmptyChatView
                    chatItem = {itemData.item.name}
                    //ind={index}
                    //isFirstMessage={true}
                  /&gt;  
                }
              /&gt; 
              &lt;View style={{ backgroundColor: Colors.searchBackGround }}&gt;
                &lt;View style={styles.listSeparator} /&gt;
              &lt;/View&gt;
            &lt;/SafeAreaView&gt;
          )}
        /&gt;
      &lt;/View&gt;
    );
  </code></pre>