File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
examples/angular/basic-persister/src/app Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change 44 provideTanStackQuery ,
55 withDevtools ,
66} from '@tanstack/angular-query-experimental'
7- import { withPersistQueryClient } from '@tanstack/angular-query-persist-client-experimental '
7+ import { withPersistQueryClient } from '@tanstack/angular-query-persist-client'
88import { createSyncStoragePersister } from '@tanstack/query-sync-storage-persister'
99import type { ApplicationConfig } from '@angular/core'
1010
@@ -19,7 +19,7 @@ export const appConfig: ApplicationConfig = {
1919 new QueryClient ( {
2020 defaultOptions : {
2121 queries : {
22- staleTime : 1000 * 60 ,
22+ staleTime : 1000 * 60 , // 1 minute
2323 gcTime : 1000 * 60 * 60 * 24 , // 24 hours
2424 } ,
2525 } ,
@@ -29,6 +29,9 @@ export const appConfig: ApplicationConfig = {
2929 persistOptions : {
3030 persister : localStoragePersister ,
3131 } ,
32+ onSuccess : ( ) => {
33+ console . log ( 'Persisted query client successfully' )
34+ }
3235 } ) ,
3336 ) ,
3437 ] ,
You can’t perform that action at this time.
0 commit comments