TanStack Query Status
Your query can be in one of the following states:
success: Your query was successful, and you havedatafor iterror: Your query did not work, and anerroris setpending: Your query has no data
Note that the isFetching flag is not part of the internal state machine - it is an additional flag that will be true whenever a request is in-flight. You can be fetching and success, you can be fetching and error - but you cannot be loading and success at the same time. The state machine makes sure of that.