Does react-query work with IndexedDB?
Does react-query work with IndexedDB?
5 Replies
rare-sapphire•3y ago
what kind of question is that 😅 . I could just say "yes" ....
exotic-emeraldOP•3y ago
Oh. I've never used it before because I use Remix but Remix's loaders only work on the server, so IndexedDb isn't available.
Any possibility you could show an example of how to use
useQuery with Dexie.js? I purchased the ReactQuery course but it only shows how to fetch from an api.rare-sapphire•3y ago
what is Dexie.js ?
but it only shows how to fetch from an api.doesn't matter. React Query is promise based. You can return a resolved or rejected promise from your QuerFn - doesn't matter if that comes over the network or not
exotic-emeraldOP•3y ago
It's a JS library for working with indexedDb.
like-gold•3y ago
persistQueryClient | TanStack Query Docs
This is set of utilities for interacting with "persisters" which save your queryClient for later use. Different persisters can be used to store your client and cache to many different storage layers.
Build Persisters