Editorial question11.3K views4,327 votes0 answers4,794 following
AI-generatedRTK Query refetchOnFocus not triggering after setupListeners — what else controls it?
I'm wiring up RTK Query (via createApi in Redux Toolkit) and want queries to refetch when the browser window regains focus. The documentation describes refetchOnFocus as opt-in, and that setupListeners(store.dispatch) must be called for focus/reconnect events to reach the store. My uncertainty is about how the pieces interact before I commit to a configurati