Offline Support #96
-
Hi, I am evaluating this library for a future project. I am a fan of React Query in general. Has anyone tried to get offline support to work? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 6 replies
-
You can use dexieJs for this, you can have the query return a conditional response based on the network state |
Beta Was this translation helpful? Give feedback.
-
@PrinzJuliano First of all The For angular though, i believe, you would need to setup the PWA Service Worker which caches your endpoints/data for the offline support. If you still want to persist your data returned by either the cache or the real endpoint you'd have to use a lib like |
Beta Was this translation helpful? Give feedback.
-
I can confirm that using persistQueryClient and persistQueryClientRestore from @tanstack/query-persist-client-core following from this example allows me to use offline support in the application. |
Beta Was this translation helpful? Give feedback.
I can confirm that using persistQueryClient and persistQueryClientRestore from @tanstack/query-persist-client-core following from this example allows me to use offline support in the application.