Reputation: 1283
I'm trying to implement an infinite list for a React project and I'd like to know if there is an equivalent to the onEndReached
from react-native
that I could use to get this done easily. The idea would be to have an offset
and a limit
in my request so that I can append a batch of elements after I reached the end of my list.
I haven't found many options except some already complete components but I do need to implement mine.
I also found this question from January 27 (How can I implement a robust onEndReached for ScrollView on React Native) but since he doesn't have any answer I thought I should ask here.
Do you guys have any idea ?
Thanks in advance
Upvotes: 1
Views: 639
Reputation: 23088
By quick Googling, this can detect when you scroll to an element. It can call your callback to fetch more items.
https://github.com/brigade/react-waypoint
Upvotes: 1