Skip to content

Commit 6ba2dac

Browse files
committed
docs: onSuccess
1 parent 6fb8019 commit 6ba2dac

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

docs/react/plugins/persistQueryClient.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,10 +212,11 @@ ReactDOM.createRoot(rootElement).render(
212212

213213
- `persistOptions: PersistQueryClientOptions`
214214
- all [options](#options) you can pass to [persistQueryClient](#persistqueryclient) minus the QueryClient itself
215-
- `onSuccess?: () => void`
215+
- `onSuccess?: () => Promise<unknown> | unknown`
216216
- optional
217217
- will be called when the initial restore is finished
218218
- can be used to [resumePausedMutations](../reference/QueryClient#queryclientresumepausedmutations)
219+
- if a Promise is returned, it will be awaited; restoring is seen as ongoing until then
219220

220221
### useIsRestoring
221222

0 commit comments

Comments
 (0)