sajad torkamani

In a nutshell

useQuery gives you a number of derived boolean flags:

  • isFetching: true when the query is executing, whether it’s the initial fetch or subsequent background fetches.
  • isPending: true when there is no cached data and no query attempt has finished yet.
  • isLoading: true when the first request for a query is in-flight. Same as isFetching && isPending.
  • isRefetching: true when a background refetch is in-flight. It doesn’t equal true when the initial fetch is in-flight.

Sources

Leave a comment

Your email address will not be published. Required fields are marked *