Skip to content

Commit 63339fe

Browse files
fix(vue-query): add missing clientPersisterOnSuccess callback (#5889)
1 parent b2025c3 commit 63339fe

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

packages/vue-query/src/vueQueryPlugin.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ interface CommonOptions {
1919
queryClientKey?: string
2020
contextSharing?: boolean
2121
clientPersister?: ClientPersister
22+
clientPersisterOnSuccess?: (client: QueryClient) => void
2223
}
2324

2425
interface ConfigOptions extends CommonOptions {
@@ -71,6 +72,7 @@ export const VueQueryPlugin = {
7172
persisterUnmount = unmount
7273
promise.then(() => {
7374
client.isRestoring.value = false
75+
options.clientPersisterOnSuccess?.(client)
7476
})
7577
}
7678

0 commit comments

Comments
 (0)