react-query-questions
solid-query-questions
table-questions
virtual-questions
router-questions
react-charts-questions
ranger-questions
vue-query-questions
svelte-query-questions
bling-questions
form-questions
angular-query-questions
start-questions
db-questions
start-showcase
router-showcase
📣-announcements
Using useInfiniteQuery to gather all pages
useInfiniteQuery
. However, we also have a case where we need to fetch all pages of data "in bulk". That is, if there are 5 pages in total I need to be able to get all 5 before returning data to the application.
Each request requires a "token" parameter that comes from the previous page's response. I understand how to get that via getNextPageParam
, and I know that the hook's return object includes a function called fetchNextPage
. But the examples I've seen in the docs all assume that the app only wants one page at a time and only gets the next page based on an event from the user (button click, etc.).
Is this possible, with this particular hook? I wrote a custom hook that uses queryClient.fetchQuery(...)
in a loop. It works, but it doesn't update either after the data becomes stale or after the cache is forcibly cleared with invalidateQueries()
....Wait for multiple queries to succeed
Inactive queries cause refetching

How to hide error messages in console when throwing in queryFn()?

When to use select vs other options for displaying subset of data?
QueryClient shows my cache is being updated during my mutation. However the component isn't updating

How exactly is "previousData" in "placeholderData" defined?
placeholderData can also be a function, where you can get access to the data and Query meta information of a "previous" successful QueryI noticed, that when I run a query with key
["data", "1"]
and then a 2. query with key ["data", "2"]
, the second query gets the data from the first one, even they have different query keys. If run the second query with key ["data" ]
, I don't get the data from the first query....isLoading relation with React native navigation context

React Query can return RSC or JSX in the future without Tanstack Start?
Drag and drop list flickers back to original position for a second before optimistic update kicks in
How i can await revalidation in other component?
Need a Skilled Developer for my React+Node Project
queryClient through microservices (libraries)
Type definition for staleTime function parameters
["getOnboardingLink", {}]
. How would I capture this in the Query type used for the staleTime functiononSuccess is not working in component file

Input Focus Lost After Mutation with Optimistic Updates
Dependent Query Pattern
What is the best Query and mutation code format ?
Is it unwise to use @tanstack/react-query within a Next.js app?
useSuspenseQuery with react-router