Possible to persist queries on a per query basis?
I have an expensive query that I want to persist to local storage. It seems I will have to create a persister using
createSyncStoragePersister and then add a <Provider> in the react context. But I want it to be saved to localstorage for only a specific query. How can I achieve this?2 Replies
genetic-orangeOP•2y ago
genetic-orangeOP•2y ago
experimental_createPersister | TanStack Query React Docs
Installation
This utility comes as a separate package and is available under the '@tanstack/query-persist-client-core' import.