mirror of
https://github.com/Jellify-Music/App.git
synced 2026-01-07 03:20:19 -06:00
query client persistence?
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
import { MMKV } from "react-native-mmkv";
|
||||
import { createSyncStoragePersister } from "@tanstack/query-sync-storage-persister";
|
||||
import { persistQueryClient } from "@tanstack/react-query-persist-client";
|
||||
import { queryClient } from "./query-client";
|
||||
|
||||
export const storage = new MMKV();
|
||||
|
||||
@@ -16,4 +18,9 @@ const clientStorage = {
|
||||
},
|
||||
};
|
||||
|
||||
export const clientPersister = createSyncStoragePersister({ storage: clientStorage });
|
||||
export const clientPersister = createSyncStoragePersister({ storage: clientStorage });
|
||||
|
||||
persistQueryClient({
|
||||
queryClient,
|
||||
persister: clientPersister
|
||||
});
|
||||
Reference in New Issue
Block a user