Replies: 2 comments 17 replies
-
Yes, it’s supposed to work that way. It will refetch all pages in the background one after the other. If you don’t that, you can reduce the |
Beta Was this translation helpful? Give feedback.
15 replies
-
Has this been resolved? is a very annoying problem, same here I am playing on react native application and the experience is not great |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm using
useInfiniteQuery
in a react native project to fetch data forFlatList
component when the user scrolls to the bottom.If I scroll down to, lets say page 5, then navigate to another screen and then return back,
useInfiniteQuery
sends requests for all five pages without the user even touching theFlatList
. So just by opening the page I get 5 requests:http://example.com/news?page=1
http://example.com/news?page=2
http://example.com/news?page=3
http://example.com/news?page=4
http://example.com/news?page=5
Is this how
useInfiniteQuery
supposed to work? If it is, then is there a way to fetch only the first page on page load?Beta Was this translation helpful? Give feedback.
All reactions