We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I am trying to fetch all pages simultaneously using useInfiniteQuery because I know the total pages in advance, but it doesn't work as expected.
useInfiniteQuery
total pages
In the Network Tab all the requests are fired as I expected. But The data from useInfiniteQuery contains only two pages the first page & the last page.
two pages
https://codesandbox.io/s/unable-to-fetch-all-pages-simultaneously-with-useinfinitequery-n74mw4?file=/src/App.js
ReactQueryDevtools
Data Explorer
As a user, I expected to fetch multiple pages simultaneously using useInfiniteQuery by calling fetchNextPage({pageParam})
fetchNextPage({pageParam})
Every time
react-query
4.36.1
No response
The text was updated successfully, but these errors were encountered:
Closing #5583
Sorry, something went wrong.
No branches or pull requests
Describe the bug
I am trying to fetch all pages simultaneously using
useInfiniteQuery
because I know thetotal pages
in advance, but it doesn't work as expected.In the Network Tab all the requests are fired as I expected. But The data from useInfiniteQuery contains only
two pages
the first page & the last page.Your minimal, reproducible example
https://codesandbox.io/s/unable-to-fetch-all-pages-simultaneously-with-useinfinitequery-n74mw4?file=/src/App.js
Steps to reproduce
ReactQueryDevtools
Data Explorer
Expected behavior
As a user, I expected to fetch multiple pages simultaneously using
useInfiniteQuery
by callingfetchNextPage({pageParam})
How often does this bug happen?
Every time
Screenshots or Videos
Platform
Tanstack Query adapter
react-query
TanStack Query version
4.36.1
TypeScript version
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: