On Scrolling once, onEndReached keeps firing whenever there is new data in the list. Here is my code
<RecyclerListView
style={AppStyle.flexOne}
onEndReached={this.onScrollTillEnd}
onEndReachedThreshold={Globals.LIST_SCROLL_THRESHOLD}
layoutProvider={this.layoutProvider}
dataProvider={this.state.dataProvider}
rowRenderer={this.rowRenderer}
scrollViewProps={{
refreshControl: (
<RefreshControl
refreshing={initialFetch}
onRefresh={this.onRefresh}
/>
)
}}
/>
Here is the function that is triggered on onEndReached
onScrollTillEnd = async () => {
await this.fetchVisitorList();
}
whereas onEndReachThreshold is 0.1 and tried changing the value but no effect. Please help out