State Management · Middle · Question 38 of 75

What does the refetchOnMountOrArgChange option do in RTK Query?

Explanation

By default RTK Query serves cached data to new subscribers. refetchOnMountOrArgChange: true (or a number of seconds) refetches if the data is older than that. Related options: refetchOnFocus, refetchOnReconnect, pollingInterval.

Further reading

Problem with a question

State Management · Middle · question 38

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