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.

Calls `loadMore` endlessly

See original GitHub issue

Why would the component call loadMore continuously and endlessly with increasing page numbers once I reach (only once) the end of the list? What am I doing wrong? FYI, I am using redux for this.

Thanks!

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:3
  • Comments:10

github_iconTop GitHub Comments

1reaction
notflipcommented, Dec 8, 2018

It has to do with my loading variable in the state being updated, If I remove “loading” from the state all is working fine. It seems when loading is done, it re-renders and thus calls the fetchMore function again.

Still doesn’t solve it but I’ll look into why a loading variable can cause the re-render…

1reaction
tommyalvarezcommented, Apr 7, 2017

The same happens to me but instead of reaching the end, it happens on page load, probably can be due to the fact that the component is not visible yet?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Android RecyclerView Load More, Endless Scrolling
It gives me an error saying “cannot call this method in a scroll callback” but it is fixed by calling recyclerView.post() method. Just...
Read more >
How to implement endless list with RecyclerView?
Sometimes my loadMore() method called thrice in onScrolled(), Any idea why it is called thrice and how to stop calling it multiple times....
Read more >
Endless Scrolling with AdapterViews and RecyclerView
Overview. A common application feature is to load automatically more items as the user scrolls through the items (aka infinite scroll).
Read more >
loadMore function get called infinitely #163
I use React-Redux to pass loadMore and hasMore Code: import * as React from 'react'; ... I also get endless requests, solved it...
Read more >
Infinite Scrolling with Android Paging Library and Flow API
What is endless scrolling? ... So our first line sets the page number we are at, and we called it “position”, if the...
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