I am trying to implement a feature in which whenever I went to end the end of the FlatList and then when I swipe up or pull up for some small time, then this acts as a refresh and required data get loaded. Also the flatlist is long so we reach the end of the list in some time. Please help in this as I can’t get any resources available for the same.
I tried using various packages like react-native-gesture-handler etc. but couldn’t get the solution which I am hoping for.
2
Answers
Reaching the end of FlatlList amd pulling up are two different thing
For Reaching end of the list You can detect by
onEndReached
callback.For Refreshing (Pull to refresh) You can use
[RefreshControl][1]
Please see the below Example
you can check this expo snack link to view the full code.
Expo