Cancel useQueries with single function
is there a way to abort useQueries with function call (e.g. cancel, abort)?
3 Replies
Hey @vildantursic did you figure out an option here?
Hey, nope, not yet
the
cancel
method you get back from trpc utils is the same as queryClient.cancelQueries
:
https://trpc.io/docs/client/react/useUtils#helpersuseUtils | tRPC
useUtils is a hook that gives you access to helpers that let you manage the cached data of the queries you execute via @trpc/react-query. These helpers are actually thin wrappers around @tanstack/react-query's queryClient methods. If you want more in-depth information about options and usage patterns for useUtils helpers than what we provide her...