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 queryClient.fetchQuery in the loader of a TanStack route does not activate the query.
_layout
route, I do the following to fetch data. Then I access this data through useLoaderData
hook. This all works great.
However, when I check the query in the devTools, I see that it appears as inactive. I use the devTools especially to test the loading and error states, but this does not work for an inactive query.
Is there a way to activate it when using queryClient.fetchQuery
and also be able to trigger the pendingComponent
when I manually do Trigger Loading
in the devTools?
...
Is updating mutation state a good idea?
How to disable retries when network request is cancelled?

setQueriesData doesn't match query
queryClient and useQuery data is not the same(same query key)?
setQueryData
and noticed that it wasn't being updated correctly.
Then i tried to log the same data from queryclient and usequery and it turns out that there is a mismatch.
```...using return value of useQuery as a queryKey
Tanstack query + React hook form
Error Handling with React Query
new QueryClient throws error on NextJS with dynamicIO enabled.
dynamicIO
enabled I get the following error when trying to create a query client.
``
Error: Route "/" used
Date.now() instead of using
performance or without explicitly calling
await connection()` beforehand. See more info here: https://nextjs.org/docs/messages/next-prerender-current-time
at io (node_modules/next/src/server/node-environment-extensions/utils.tsx:33:31)...How to pass timeout option to useQuery using fetch from context signal in the below code.
const query = useQuery({queryKey: [key], queryFn: ({signal}) => fetch(url, {signal})})
const query = useQuery({queryKey: [key], queryFn: ({signal}) => fetch(url, {signal})})
Throw only specific errors
Issue in understanding one of the examples in tanstack/query (playground example)
useEffect not triggered when data change
Re-render 1 component but not another via the same queryKey?
select
to subscribe to a sub-set of data, i.e I am assuming that when another component invokes invalidateQueries
for the same queryKey, it shouldn't re-render the other component if the select
returns a sub-set of data that did not change?Sporadic network errors
useQueries({ combine: ... }) vs useMemo
combine
in useQueries
vs taking all the query results and passing into useMemo
to "reduce" results down?
Seems like since we lose the nuance of each query in combine
, we'd get the ~same effect with a useMemo
...Is it possible to set default queryKey for all queries?
queryKey
that applies to all queries? In my project, I send the user's language with most queries to receive translations based on it. I want to refetch the query whenever the user changes the app language.
Of course, I could add the language as a queryKey
for each individual query, but is there a way to set this as a default for all queries?...How to properly filter data in tanstack table?
Persisting mutations for offline