Skip to content

refetchIntervalInBackground behaviour on mobile #5170

Answered by TkDodo
ikryvorotenko asked this question in Q&A
Discussion options

You must be logged in to vote

refetchIntervalInBackground checks for focusManager.isFocused, which you might need to implement differently in react-native: https://tanstack.com/query/v4/docs/react/react-native#refetch-on-app-focus

If the question wasn't about react native, but just browsers on mobile: focusManager is implemented with the visibilitychange event, so I think it'll work just the same as on a desktop

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by ikryvorotenko
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants