FlatList onEndReached not working if onScroll is set in renderScrollComponent
See original GitHub issue <FlatList
onEndReached={() => {
console.log("reached");
}}
renderScrollComponent={props => {
return (
<Animated.ScrollView
{...props}
onScroll={Animated.event(
[{ nativeEvent: { contentOffset: { y: value } } }],
{ useNativeDriver: true }
)}
/>
);
}}
/>;
I did get the value update. However, onEndReached
is never called.
Any idea how to get the value update and not breaking onEndReached
?
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:11 (5 by maintainers)
Top Results From Across the Web
ReactNative Flatlist onEndReached not working
In my case the problem was with nativebase <Content> . It was creating problems when <FlatList> was used inside it. Solution :
Read more >FlatList - React Native
A performant interface for rendering basic, flat lists, supporting the most handy features:
Read more >scrolleventthrottle flatlist - You.com | The search engine you control.
To render multiple columns, use the numColumns prop. Using this approach instead of a flexWrap layout can prevent conflicts with the item height...
Read more >Usage | FlashList
If you are familiar with FlatList, you already know how to use ... This can sometimes cause issues when used with initialScrollIndex in ......
Read more >Unable to render data to ReactNative FlatList on Scroll down ...
I am using FlatList's onEndReached prop to get new items on scroll. ... Http GET requests, but when I use Http POST method...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@CallMeHeisenberg @jkadamczyk I also managed to work around this by memoizing the animated flatlist
Not sure if this is the right approach, but it got me working since the other suggestions above didn’t seem to work.
Yes it does! thanks