react-native-bidirectional-infinite-scroll
react-native-bidirectional-infinite-scroll copied to clipboard
Double call onEndReached/onStartReached function
Hi. Thanks for such library, but i faced two issues. Ill create another "issue" to separate them later. So the first as title says: every time i have double call for both end reached functions. I have tried some blockers like "isLoading" with useState or useRef, and anyway i've got a double call.
onEndReached={() => fetchNextEvents('someParams')}
onStartReached={() => fetchPrevEvents('someParams')}
onEndReached={fetchNextEvents}
onStartReached={fetchPrevEvents}
const fetchPrevEvents = async (someParams = 'DEFAULT_PARAM') => {
try {
const events = await fetchEvents(someParams);
...
} catch (err) {
console.log('Error fetching prev events', err);
}
};
IOS simulator - iPhone 11 - 14.4
"react-native": "0.64.0", "react-native-bidirectional-infinite-scroll": "^0.3.3", "@stream-io/flat-list-mvcp": "^0.10.1", "react": "17.0.1",
Well, after some work around, the issue is dissapearing after setting prop bounces={false}