-
Notifications
You must be signed in to change notification settings - Fork 294
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
onEndReached called on initial render #937
Comments
+1 |
3 similar comments
+1 |
+1 |
+1 |
Yeah, run twice |
Mine ran non-stop |
If the content doesn't fill the screen on initial render then the callback will fire. If it's being called incorrectly then most like the |
This issue persists. In my case, the content fills the screen on initial render. Note that I have a list over 30 items. |
|
Following the guidelines on estimatedItemSize helped. I had initially thought it meant how many items would be displayed on each render, but fixing it appropriately solved the problem.
|
@jothamc Could you explain further what exactly helped you? Thanks |
@naqvitalha I have added a correct |
I had thought that |
Does the above help too? |
Current behavior
<FlashList
data={products}
keyExtractor={(item) => item._id}
estimatedItemSize={200}
numColumns={2}
showsVerticalScrollIndicator={false}
renderItem={(item) => (
)}
ListEmptyComponent={}
onEndReached={() => {
console.log("on end reach");
handleStartLoadingMore() && loadMore();
}}
onEndReachedThreshold={0.25}
ListFooterComponent={isLoading && loading more...}
/>
Platform:
Environment
"@shopify/flash-list": "^1.6.2",
"react": "18.2.0",
"react-native": "0.72.5",
The text was updated successfully, but these errors were encountered: