useIsFetching ist ein optionaler Hook, der die Anzahl der Abfragen zurückgibt, die Ihre Anwendung gerade im Hintergrund lädt oder abruft (nützlich für App-weite Ladeindikatoren).
import { useIsFetching } from '@tanstack/vue-query'
// How many queries are fetching?
const isFetching = useIsFetching()
// How many queries matching the posts prefix are fetching?
const isFetchingPosts = useIsFetching({ queryKey: ['posts'] })
import { useIsFetching } from '@tanstack/vue-query'
// How many queries are fetching?
const isFetching = useIsFetching()
// How many queries matching the posts prefix are fetching?
const isFetchingPosts = useIsFetching({ queryKey: ['posts'] })
Optionen
Gibt zurück