You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
### `persistQueryClient` and the corresponding persister plugins are no longer experimental and have been renamed
213
213
214
-
The plugins `createWebStoragePersistor` and `createAsyncStoragePersistor` have been renamed to [`createWebStoragePersister`](/plugins/createWebStoragePersister) and [`createAsyncStoragePersister`](/plugins/createAsyncStoragePersister) respectively. The interface `Persistor` in `persistQueryClient` has also been renamed to `Persister`. Checkout [this stackexchange](https://english.stackexchange.com/questions/206893/persister-or-persistor) for the motivation of this change.
214
+
The plugins `createWebStoragePersistor` and `createAsyncStoragePersistor` have been renamed to [`createSyncStoragePersister`](/plugins/createSyncStoragePersister) and [`createAsyncStoragePersister`](/plugins/createAsyncStoragePersister) respectively. The interface `Persistor` in `persistQueryClient` has also been renamed to `Persister`. Checkout [this stackexchange](https://english.stackexchange.com/questions/206893/persister-or-persistor) for the motivation of this change.
215
215
216
216
Since these plugins are no longer experimental, their import paths have also been updated:
217
217
@@ -221,7 +221,7 @@ Since these plugins are no longer experimental, their import paths have also bee
221
221
- import { createAsyncStoragePersistor } from 'react-query/createAsyncStoragePersistor-experimental'
222
222
223
223
+ import { persistQueryClient } from '@tanstack/react-query-persist-client'
224
-
+ import { createWebStoragePersister } from '@tanstack/query-sync-storage-persister'
224
+
+ import { createSyncStoragePersister } from '@tanstack/query-sync-storage-persister'
225
225
+ import { createAsyncStoragePersister } from '@tanstack/query-async-storage-persister'
Copy file name to clipboardExpand all lines: docs/guides/mutations.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -286,7 +286,7 @@ If you persist offline mutations with the [persistQueryClient plugin](../plugins
286
286
This is a technical limitation. When persisting to an external storage, only the state of mutations is persisted, as functions cannot be serialized. After hydration, the component that triggeres the mutation might not be mounted, so calling `resumePausedMutations` might yield an error: `No mutationFn found`.
Copy file name to clipboardExpand all lines: docs/plugins/createAsyncStoragePersister.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -39,7 +39,7 @@ persistQueryClient({
39
39
40
40
## Retries
41
41
42
-
Retries work the same as for a [WebStoragePersister](./createWebStoragePersister), except that they can also be asynchronous. You can also use all the predefined retry handlers.
42
+
Retries work the same as for a [SyncStoragePersister](./createSyncStoragePersister), except that they can also be asynchronous. You can also use all the predefined retry handlers.
@@ -57,7 +57,7 @@ the persister `removeClient()` is called and the cache is immediately discarded.
57
57
### `persistQueryClientSave`
58
58
59
59
- Your query/mutation are [`dehydrated`](../reference/hydration#dehydrate) and stored by the persister you provided.
60
-
-`createWebStoragePersister` and `createAsyncStoragePersister` throttle this action to happen at most every 1 second to save on potentially expensive writes. Review their documentation to see how to customize their throttle timing.
60
+
-`createSyncStoragePersister` and `createAsyncStoragePersister` throttle this action to happen at most every 1 second to save on potentially expensive writes. Review their documentation to see how to customize their throttle timing.
61
61
62
62
You can use this to explicitly persist the cache at the moment(s) you choose.
63
63
@@ -181,8 +181,8 @@ For this use-case, you can use the `PersistQueryClientProvider`. It will make su
0 commit comments