TanStackT
TanStack7mo ago
13 replies
skinny-azure

Offline behaviour (V5)

I've been trying for some time using react query to enable offline support for my application.

Today, I found that the V5 completely changed the behaviour, let me explain.

Before, having the application offline using networkMode online, react query only fired the queries only if the application was online, even reloading the browser.

Right now (V5), I found that this was not always true. If I have a service worker to cache my assets and when setting the application offline, and refresh the app, the react query triggers all the requests that belong to the page, breaking the application.

How can I prevent this behaviour?
Was this page helpful?