Open History to see the last commit
1---
2id: useIsFetching
3title: useIsFetching
4---
5β
6`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).
7β
8```js
9import { useIsFetching } from 'react-query'
10// How many queries are fetching?
11const isFetching = useIsFetching()
12// How many queries matching the posts prefix are fetching?
13const isFetchingPosts = useIsFetching(['posts'])
14```
15β
16**Options**
17β
18- `queryKey?: QueryKey`: [Query Keys](../guides/query-keys)
19- `filters?: QueryFilters`: [Query Filters](../guides/filters#query-filters)
20β
21**Returns**
22β
23- `isFetching: number`
24 - Will be the `number` of the queries that your application is currently loading or fetching in the background.