question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

onEndReached called many many times

See original GitHub issue

Environment

React Native Environment Info:
    System:
      OS: macOS 10.14.1
      CPU: (4) x64 Intel(R) Core(TM) i5-7360U CPU @ 2.30GHz
      Memory: 32.12 MB / 8.00 GB
      Shell: 5.3 - /bin/zsh
    Binaries:
      Node: 8.11.1 - /usr/local/bin/node
      Yarn: yarn install v0.22.0
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...
success Saved lockfile.
Done in 41.76s. - /usr/local/bin/yarn
      npm: 6.1.0 - /usr/local/bin/npm
      Watchman: 4.9.0 - /usr/local/bin/watchman
    SDKs:
      iOS SDK:
        Platforms: iOS 12.1, macOS 10.14, tvOS 12.1, watchOS 5.1
      Android SDK:
        API Levels: 23, 26, 27, 28
        Build Tools: 27.0.3, 28.0.3
    IDEs:
      Xcode: 10.1/10B61 - /usr/bin/xcodebuild
    npmPackages:
      react: 16.6.1 => 16.6.1
      react-native: 0.57.5 => 0.57.5
    npmGlobalPackages:
      create-react-native-app: 1.0.0
      react-native-cli: 2.0.1
      react-native-git-upgrade: 0.2.7

Description

Once you scroll Flatlist to the bottom, call onEndReached, then props changed, it call once again!

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:9 (2 by maintainers)

github_iconTop GitHub Comments

16reactions
Prozhoucommented, Mar 24, 2019

i don’t think this problem have been resolved. when put sectionlist in scrollview still have problem. onEndReached be call again and again.

7reactions
Liqiankuncommented, Jan 23, 2019

Set Flatlist style height ‘100%’ solved this issue!

Read more comments on GitHub >

github_iconTop Results From Across the Web

iOS : FlatList onEndReached being called multiple times
iOS : FlatList onEndReached being called multiple times [ Gift : Animated Search Engine : https://bit.ly/AnimSearch ] iOS : FlatList ...
Read more >
FlatList onEndReached being called multiple times-React Native
Coding example for the question FlatList onEndReached being called multiple times-React Native.
Read more >
How it works | React Native Bidirectional Infinite Scroll
You can add a prop onEndReached on FlatList . This function gets called when your scroll is near the end of the list,...
Read more >
onmomentumscrollbegin, sectionlist onendreached ...
When scrollTo is called, OnMomentumScrollBegin should be called at the begining and OnMomentumScrollEnd ... onendreached flatlist calling multiple times.
Read more >
react native flatlist infinite loop - You.com | The AI Search ...
onEndReached should not be called on load; I'm able to load more pages as I scroll down, however, it will call onEndReached multiple...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found