How to check if there's a currently used query in cache
I need to check if there's an active query being used in the UI. I tried with
but am always getting
undefined.2 Replies
fascinating-indigo•3y ago
https://tanstack.com/query/v4/docs/vue/reference/useIsFetching
You can provide filter with queryKey
useIsFetching | TanStack Query Docs
useIsFetching is an optional hook that returns the number of the queries that your application is loading or fetching in the background (useful for app-wide loading indicators).
`tsx
yappiest-sapphireOP•3y ago
Is
{type:'active'} not exactly that?