Download ui/lib/queryClient.ts from Jadewave/trans2: direct link, hf CLI and curl.
- Browser
- Download file 482 Bytes
-
https://huggingface.co/spaces/Jadewave/trans2/resolve/main/ui/lib/queryClient.ts
- Command line
-
hf download hf://spaces/Jadewave/trans2/ui/lib/queryClient.ts
-
curl -L -o queryClient.ts https://huggingface.co/spaces/Jadewave/trans2/resolve/main/ui/lib/queryClient.ts
482 Bytes
| 'use client' | |
| import { QueryClient } from '@tanstack/react-query' | |
| /** | |
| * Shared singleton QueryClient. React components mount it via the provider in | |
| * `app/providers.tsx`; non-React modules import it directly to run | |
| * invalidations after mutations (`queryClient.invalidateQueries(...)`). | |
| * | |
| * Keeping a single client across the app means imperative `applyCommand`-style | |
| * calls and React Query hooks share the exact same cache. | |
| */ | |
| export const queryClient = new QueryClient() | |