React · Junior · Question 49 of 75

How do isPending and isFetching differ in TanStack Query v5?

Explanation

isPending (status pending) means there's no data in the cache yet - show a skeleton. isFetching is true for every request, including background refetches of existing data - a small indicator fits here. In v4, isLoading was used instead of isPending.

Further reading

Problem with a question

React · Junior · question 49

Test yourself

Take the React · Junior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz