--- id: useIsFetching title: useIsFetching --- ```ts function useIsFetching(filters?, queryClient?): ReactiveValue; ``` Defined in: [packages/svelte-query/src/useIsFetching.svelte.ts:40](https://github.com/TanStack/query/blob/main/packages/svelte-query/src/useIsFetching.svelte.ts#L40) ## Parameters ### filters? [`QueryFilters`](../interfaces/QueryFilters.md)\ [QueryFilters](../interfaces/QueryFilters.md) to narrow down which queries to count. Omit to count every fetching query. ### queryClient? [`QueryClient`](../classes/QueryClient.md) Use this to use a custom `QueryClient`. Otherwise, the one from the nearest context will be used. ## Returns `ReactiveValue`\<`number`\> A reactive value — read `.current` to get how many matching queries are currently fetching. ## Examples ```svelte {#if isFetchingPosts.current} Refreshing posts... {/if} ``` A global loading indicator for any query fetching in the background, not just the ones on screen: ```svelte {#if isFetching.current}
Queries are fetching in the background...
{/if} ```