I am developing an application on React Native. I created the notification component. I have created two unread and read tabs. Clicking on the notifications is immediately read on the API. OnEndReachedThreshold works automatically when I enter FlatList and there is one item. Idont want this. Let it work if data is greater than 10. I hope you understand. My English is not good, sorry.
Sample line of code
<FlatList
data={notifyReadData}
renderItem={({item}) =>
<ListItem
title={item.userName}
subtitle={Moment(item.createdAt, 'YYYY-MM-DD HH:mm:ss', true).add(3, 'hour').format("DD.MM.YYYY HH:mm")}
leftIcon={<Icon
name='bell-o'
size={24}
color='black'
/>}
bottomDivider={true}
/>
}
keyExtractor={this.keyExtractor}
refreshing={isRefreshing}
onRefresh={this.handleRefresh}
onEndReached={this.handleLoadMore}
onEndReachedThreshold={0.01}
/>