Skip to content

Commit

Permalink
feat: update plugin init (#55)
Browse files Browse the repository at this point in the history
  • Loading branch information
Hebilicious committed Dec 19, 2023
1 parent 716972a commit 773728f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
Binary file modified bun.lockb
Binary file not shown.
8 changes: 3 additions & 5 deletions packages/vue-query-nuxt/src/runtime/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,8 @@ export default defineNuxtPlugin((nuxt) => {
vueQueryState.value = dehydrate(queryClient)
})
}
if (process.client) {
nuxt.hooks.hook("app:created", () => {
hydrate(queryClient, vueQueryState.value)
})
}

if (process.client) hydrate(queryClient, vueQueryState.value)

return pluginReturn
})

0 comments on commit 773728f

Please sign in to comment.