|
Download react-query/docs/framework/react/reference/useIsMutating.md from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 825 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/1e92f2d0b9e054abc23a53595fd89ad3e2b4a34e/react-query/docs/framework/react/reference/useIsMutating.md
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset@1e92f2d0b9e054abc23a53595fd89ad3e2b4a34e/react-query/docs/framework/react/reference/useIsMutating.md
-
curl -L -o useIsMutating.md https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/1e92f2d0b9e054abc23a53595fd89ad3e2b4a34e/react-query/docs/framework/react/reference/useIsMutating.md
825 Bytes
metadata
id: useIsMutating
title: useIsMutating
useIsMutating is an optional hook that returns the number of mutations that your application is fetching (useful for app-wide loading indicators).
import { useIsMutating } from '@tanstack/react-query'
// How many mutations are fetching?
const isMutating = useIsMutating()
// How many mutations matching the posts prefix are fetching?
const isMutatingPosts = useIsMutating({ mutationKey: ['posts'] })
Options
filters?: MutationFilters: Mutation FiltersqueryClient?: QueryClient,- Use this to use a custom QueryClient. Otherwise, the one from the nearest context will be used.
Returns
isMutating: number- Will be the
numberof the mutations that your application is currently fetching.
- Will be the