Download react-query/examples/angular/optimistic-updates/src/app/app.config.ts from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 682 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/1e92f2d0b9e054abc23a53595fd89ad3e2b4a34e/react-query/examples/angular/optimistic-updates/src/app/app.config.ts
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset@1e92f2d0b9e054abc23a53595fd89ad3e2b4a34e/react-query/examples/angular/optimistic-updates/src/app/app.config.ts
-
curl -L -o app.config.ts https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/1e92f2d0b9e054abc23a53595fd89ad3e2b4a34e/react-query/examples/angular/optimistic-updates/src/app/app.config.ts
682 Bytes
| import { | |
| provideHttpClient, | |
| withFetch, | |
| withInterceptors, | |
| } from '@angular/common/http' | |
| import { | |
| QueryClient, | |
| provideTanStackQuery, | |
| withDevtools, | |
| } from '@tanstack/angular-query-experimental' | |
| import { mockInterceptor } from './interceptor/mock-api.interceptor' | |
| import type { ApplicationConfig } from '@angular/core' | |
| export const appConfig: ApplicationConfig = { | |
| providers: [ | |
| provideHttpClient(withFetch(), withInterceptors([mockInterceptor])), | |
| provideTanStackQuery( | |
| new QueryClient({ | |
| defaultOptions: { | |
| queries: { | |
| gcTime: 1000 * 60 * 60 * 24, // 24 hours | |
| }, | |
| }, | |
| }), | |
| withDevtools(), | |
| ), | |
| ], | |
| } | |