State Management · Middle · Question 57 of 75

How do you refetch an RTK Query every 30 seconds while the component is mounted?

Explanation

Polling stops automatically on unmount. skipPollingIfUnfocused avoids requests in background tabs.

Further reading

Problem with a question

State Management · Middle · question 57

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