We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Describe the bug I just noticed that the built-in onlineManager instance emits a notification only when going online, but not when going offline.
onlineManager
To Reproduce
React.useEffect( () => onlineManager.subscribe(() => { // Logs only `{ online: true }`, no matter what happens // Cannot detect going offline console.log({ online: onlineManager.isOnline() }); }), [], );
Expected behavior OnlineManager should listen to the "offline" event of browsers, besides just "online".
OnlineManager
"offline"
"online"
Desktop (please complete the following information):
Additional context It seems like the default listener in OnlineManager doesn’t listen for "offline" events: https://github.com/tannerlinsley/react-query/blob/ac342e237ae9fab6759f2d7be616662da6c16225/src/core/onlineManager.ts#L51-L63
The text was updated successfully, but these errors were encountered:
fix(onlineManager): listen to 'offline' events
e70d00f
Fixes TanStack#1654
fix(onlineManager): listen to 'offline' events (#1656)
e9208b2
Fixes #1654
🎉 This issue has been resolved in version 3.5.13 🎉
The release is available on:
Your semantic-release bot 📦🚀
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
Describe the bug
I just noticed that the built-in
onlineManager
instance emits a notification only when going online, but not when going offline.To Reproduce
Expected behavior
OnlineManager
should listen to the"offline"
event of browsers, besides just"online"
.Desktop (please complete the following information):
Additional context
It seems like the default listener in
OnlineManager
doesn’t listen for"offline"
events: https://github.com/tannerlinsley/react-query/blob/ac342e237ae9fab6759f2d7be616662da6c16225/src/core/onlineManager.ts#L51-L63The text was updated successfully, but these errors were encountered: