State Management · Middle · Question 39 of 75
When does SWR revalidate data automatically by default?
- ✓Correct answer: On mount, on window focus and on network reconnect
- 2Only when the user clicks a refresh button
- 3Every 5 seconds regardless of activity
Explanation
Each trigger can be turned off (revalidateOnFocus: false, revalidateOnReconnect: false), and polling is enabled with refreshInterval. For immutable data there's useSWRImmutable.