Skip to content
Source
Sign inSign up
TanStack/query
Open History to see the last commit

main.ts

17 lines450 Bytes

1import { createApp } from 'vue'
2import { VueQueryPlugin } from '@tanstack/vue-query'
3import App from './App.vue'
4import type { VueQueryPluginOptions } from '@tanstack/vue-query'
5​
6const vueQueryOptions: VueQueryPluginOptions = {
7 queryClientConfig: {
8 defaultOptions: {
9 queries: {
10 gcTime: 1000 * 60 * 60 * 24,
11 // staleTime: 1000 * 10,
12 },
13 },
14 },
16​
17createApp(App).use(VueQueryPlugin, vueQueryOptions).mount('#app')