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
How to do dependent queries in svelte?
How to test the queryClient?
Trigger query with react-hook-form
Sharing a query client between MFE's using vite
Using useQueryClient inside onSuccess
Invalidating query
cacheTime
to 0
, but it doesn't work.
``ts
const endpoint =
user/${userId}/account/${accountLinkId}`
const { mutateAsync: saveUserPreference } = useMutation({...Prevent server calls on loader based on client cache
Prefetch query status
Offline capabilities
staleTime
and gcTime
to an hour or so, but I want to immediately invalidate the query data and fetch once again, when the component is rendered. The behaviour should be exactly similar when you have initialData
Why is prevData undefined in my onSuccess of my mutation?
prevData
is undefined. This isn't the first time I've used this library, so I'm baffled. Here is my full useMutation function:
```js
const {mutateAsync: insertPriceListMutation} = useMutation({
mutationFn: insertPriceList,
onSuccess: async (data) => {...Mutation problem from different files
Correct way of prefetching data with NextJS App router
/dashboard/workspaceName/theInternalPage
. I have noticed that when navigating btn diff pages takes longer time at first when the data is not yet fetched but once it is fetched navigating btn is instant and fast.
My question is, is it a good practice if i prefetch all of my queries in the middleware using queryClient.prefetchQuery
? this will fire the request a bit earlier as middleware is first executed in nextjs.
now on the /dashboard/workspaceName/InternalPage
I can still do the normal fetch but my guess is it will now look up at the cache and not wait for it to load. someone correct me on this one...Query not retrying after axios 401 error
Mutation isLoading including query invalidation?
isLoading
on a mutation to also cover the query invalidation we do on success? Without this, the UI becomes janky as the action appears to complete but refreshed data doesn't arrive until another network round trip?App-level polling with react-query
Retrieving body json when errors occur with useQuery
throw new Error
and I'm unable to call the await response.json()
in this GET function or else the useQuery
stops working, because it expects the promise as the return value. If I throw the error and then modify the error after the fact with the response body, my react code doesnt update. I'm in a pickle.
my fetch code:
```ts
// Dead simple GET request...Why I can't see the prefetching data info on devtools
Mutation transformation best practices
Advanced SSR - is queryFn on the client redundant?
tanstack/react-query
and Next.js
Looking through the documentation, I found the following resource (https://tanstack.com/query/latest/docs/framework/react/guides/advanced-ssr).
In my use case, I am implementing the app router, but what is confusing me is the code that is run on the client. ...Use my queryClient oustide React context