State Management · Middle · Question 26 of 75

How does staleTime differ from gcTime?

Explanation

Fresh data isn't refetched on mount or focus. Stale data is still shown from cache and refreshed in the background. gcTime (formerly cacheTime, 5 minutes by default) starts when the query has no observers.

Further reading

Problem with a question

State Management · Middle · question 26

Test yourself

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

Take this quiz