My screen have header component and tabs component. Like this;
<ScrollView>
<ProfileCover/>
<Tabs>
<TabOne title='Posts'>
<FlatList data={data.posts} onEndReached={this.loadMore} onEndThreshold={0.1}/>
</TabOne>
<TabTwo title='Likes'>
<FlatList data={data.likes} onEndReached={this.loadMore} onEndThreshold={0.1} />
</TabTwo>
</Tabs>
</ScrollView>
When rendered screen, loadMore function trigger again and again. How can I use FlatList with ScrollView ?
I am tried with ListHeaderComponent without ScrollView it's working but when tabs change re-rendering all screen. How can I solve this problem ?