InvTrack / invtrack

GNU General Public License v3.0
1 stars 2 forks source link

Offline once and for all #78

Open michalstruck opened 9 months ago

michalstruck commented 9 months ago

Sort out the offline question. Thorough research about ins and outs of the persistQueryClient, how to handle resuming mutations (and default mutation functions), how to handle offline refetches. Consider centralizing all the query keys in a single file, like here: https://codesandbox.io/p/devbox/tanstack-query-example-react-offline-mmcnvh?file=%2Fsrc%2Fmovies.js%3A16%2C41

Check if cached mutations can be discarded on requery, based on difference from cache (as in, quantity in cache != incoming quantity, cancel mutation)

michalstruck commented 8 months ago

this looks promising https://github.com/kapobajza/React_Native_Offline_first_sample