Skip to content
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 call multiple times & not correct #13

Open
lambaosk8 opened this issue Aug 18, 2017 · 3 comments
Open

onEndReached call multiple times & not correct #13

lambaosk8 opened this issue Aug 18, 2017 · 3 comments

Comments

@lambaosk8
Copy link

Hi there, you library is very cool except onEndReached not working correctly. I know you guys will fix it in the future. My question is when you will develop it. I really really need onEndReached feature. So any suggestion? Appreciated it!

@janicduplessis
Copy link
Contributor

I don't have an timeframe for a fix, this is a known issue.

In my apps I'm using a flag to tell that I'm currently loading more data to avoid doing it multiple times and it works well for my use case. It looks like:

_onEndReached = () => {
  if (!this.state.loading) {
    // load more
  }
};

This way even if onEndReached is called multiple times it still works.

@VesperDev
Copy link

@janicduplessis this works man! thanks by you comment!!

@jose920405
Copy link

@janicduplessis If you Threshold is short... that state it is not enough, because change that state is async and in that async time _onEndReached can be dispatched multiple times

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants