Replies: 1 comment 2 replies
-
I guess the example is not completely correct. You need to check for the app state to be active. That's what I am doing: focusManager.setEventListener(() => {
const handleAppStateChange = (appState: AppStateStatus) => {
focusManager.setFocused(appState === 'active')
}
AppState.addEventListener('change', handleAppStateChange)
return () => {
AppState.removeEventListener('change', handleAppStateChange)
}
}) |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
I am expecting a refetch when the app is back in focus. after I added this https://react-query.tanstack.com/guides/window-focus-refetching#managing-focus-in-react-native but I am not getting a refetch
I added this to my App.js to subscribe to AppState changes
What might I be doing wrong?
Beta Was this translation helpful? Give feedback.
All reactions