|
Download react-query/docs/framework/angular/guides/window-focus-refetching.md from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 713 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/1e92f2d0b9e054abc23a53595fd89ad3e2b4a34e/react-query/docs/framework/angular/guides/window-focus-refetching.md
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset@1e92f2d0b9e054abc23a53595fd89ad3e2b4a34e/react-query/docs/framework/angular/guides/window-focus-refetching.md
-
curl -L -o window-focus-refetching.md https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/1e92f2d0b9e054abc23a53595fd89ad3e2b4a34e/react-query/docs/framework/angular/guides/window-focus-refetching.md
713 Bytes
| id: window-focus-refetching | |
| title: Window Focus Refetching | |
| ref: docs/framework/react/guides/window-focus-refetching.md | |
| replace: { '@tanstack/react-query': '@tanstack/angular-query-experimental' } | |
| [//]: # 'Example' | |
| ```ts | |
| export const appConfig: ApplicationConfig = { | |
| providers: [ | |
| provideTanStackQuery( | |
| new QueryClient({ | |
| defaultOptions: { | |
| queries: { | |
| refetchOnWindowFocus: false, // default: true | |
| }, | |
| }, | |
| }), | |
| ), | |
| ], | |
| } | |
| ``` | |
| [//]: # 'Example' | |
| [//]: # 'Example2' | |
| ```ts | |
| injectQuery(() => ({ | |
| queryKey: ['todos'], | |
| queryFn: fetchTodos, | |
| refetchOnWindowFocus: false, | |
| })) | |
| ``` | |
| [//]: # 'Example2' | |
| [//]: # 'ReactNative' | |
| [//]: # 'ReactNative' | |