Flatlist Load More

Viewed 67

I'm having a trouble figuring out the solution to my problem. Load more is working when the content covers the whole screen but if the content doesn't occupy the screen it stuck in loading.

  onEndReachedThreshold={0.5}
  onEndReached={() => fetchMoreData()}

data content

is there a way to load another 10 items if the content doesn't occupy the whole screen? thank you so much for your help on this!

1 Answers

In my opinion, you can add isFetchMore flag default is true, when fetching data, if the length of data = 0, it means no more data from the server. You can use this flag to stop loadmore

Related