T
TanStack•11mo ago
like-gold

Polling stops and doesn't resume

Hi everyone 👋 I’m encountering an issue in my React Native app where, under specific conditions (likely involving iOS users on the release app in power-saving mode and/or transitioning the app between the background and foreground), the polling functionality stops and does not resume. Does anyone have insights into what might be causing this issue? Or any suggestions on how to debug and move forward?
2 Replies
foreign-sapphire
foreign-sapphire•11mo ago
I think thinking of it as polling is probably misguided. https://tanstack.com/query/latest/docs/framework/react/guides/important-defaults will tell you what the defaults are set up for when a refetch happens, but the gist is if you want to make sure a refresh happens after x time, you'll need to set your own refetchInterval
Important Defaults | TanStack Query React Docs
Out of the box, TanStack Query is configured with aggressive but sane defaults. Sometimes these defaults can catch new users off guard or make learning/debugging difficult if they are unknown by the u...
foreign-sapphire
foreign-sapphire•11mo ago
Besides that if you still have issues, we'll need a reproduction of your issue in code

Did you find this page helpful?