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
Extract the queryfn return type from a queryOptions object
Invalidate query?
Aborting paused mutations
mutationFn
one by one. If one mutation in chain throw an error, onError
handler rollbacks optimistic update. And in this moment I want to abort all further mutations with specific variables. Because next mutation probably will throw an error too and their context has already invalid previous value that should not be used for rollback....jwt in query key
${claims.subject}-${hash(claims)}
....QueryOptions default error type
Error
, however when using queryOptions helper the default error type is unknown
. Is this this is on purpose?How can I specify accepting a queryOptions as a type?
Using useInfinteQuery and FlashList together but having issue immediately showing updates
What is the right way to do on click SSE query that feeds multiple components
Invalidate / clear mutation after success?
meta
fields into mutation and adjust styles based on the active mutation state, but need this to be cleared after success. So what is the approach to invalidate/clear mutation back to an empty
state?Only plain objects, and a few built-ins, can be passed to Server Actions. Classes or null...
queryFn:()=> getTodos()
in the clinet component
But gives an error if queryFn: getTodos
...What is 'request' mean in document?
This ensures that data is not shared between different users and requests
,
I'm confusing the meaning of word 'request' between api request to server and react client of which single user using.
or any other meaning of request here? I'm noob to this library plz help!...How can I reset query cache without refetching it?
Stop refetch on page change
refetchOn*
prop with false to the hook but it doesn't work. Here is SS of the related code:
PS: the useUser
hook is used in most of my components, including the ones used on the SS, if that changes anything :x...
Refetch a query with new variables but keep data from previous results as well
Issue with data persisting
What's the best practice to refetch data on select change that triggers a mutate
currentActionName
doesn't get updated in time for actionData
to be updated/refetched so that updateBigData.mutate
can be invoked with the fresh data (actionData
belonging to newActionName
)
Here's an abbreviated version of my code:...Prefetch query with nextjs app router
useGetUser for auth, but pending state/data doesnt reset
useInfiniteQuery with more than 1 param
What's a nice code pattern to revalidatePath on each query?