Course lesson
Use isPending, isLoading and isFetching flags with React Query
There are nuances between the three loading states provided by the useQuery hook:
- Duration
- 3 min
- Access
- Included
- Transcript
- Retained from source evidence
There are nuances between the three loading states provided by the useQuery hook:
isPending: there's no data and a query hasn't been made yet.isFetching: the query is being fetchedisLoading: there's no data, and there's a query currently being fetched. Notice that it's a combination of the above.
In this lesson, you'll learn where you'd want to use each of these states.