Skip to main content
Version: v8.0.0

useIsFetching

Count of the currently running fetch requests (useFetch, useCache and fetch dispatcher). Useful for global loading indicators.


Import
import { useIsFetching } from "@hyper-fetch/react"

Parameters​

useIsFetching(client: ClientInstance, options: UseIsFetchingOptionsType)
Parameters
NameTypeDescription
client
ClientInstance

Client instance

options
UseIsFetchingOptionsType

Filters for the counted requests

Returns​

number of running requests
number