React Query: isLoading vs isFetching vs isRefetching
24 January 2023 (Updated 25 January 2023)
On this page
isLoading or `status === ‘loading’`
true when the query has no data yet and is fetching for the first time.
true whenever a request is in-flight – includes the initial request and subsequent refetches.
true whenever a request is in-flight, but doesn’t include the initial request. Equivalent to
isFetching && !isLoading.
Tagged: React Query