Closed rexyou0831 closed 1 year ago
facing the same issue
same here. has there been any update on this?
i found a solution to mine. turns out i was passing the wrong value to the dataLength
prop
dataLength
should carry the value of the last_page
in your case and not the total length @rexyou0831
<InfiniteScroll
hasMore={true}
next={() => fetchMoreData()}
dataLength={orders.length}
loader={<p className="text-center mt-8">Loading more orders...</p>}
endMessage={<p className="text-center mt-8">End of list</p>}>
<LiveTripCards orders={orders} />
</InfiniteScroll>
hi @dustyjay thanks for the suggestion but my side found out that I need to separate the axios function call The height also causing the problems not continue call API. Here is my current solution sample
https://github.com/rexyou0831/react_infinite_scroll/blob/test_1/src/App.js
Hi there,
I'm new to use this library, just wondering why my side next props not working to get the next page, am I doing wrong?
` const Results = () => {