Spaces:
Paused
Paused
Download frontend/node_modules/@tanstack/react-query/src/usePrefetchInfiniteQuery.tsx from AUXteam/UX-agent: direct link, hf CLI and curl.
- Browser
- Download file 647 Bytes
-
https://huggingface.co/spaces/AUXteam/UX-agent/resolve/main/frontend/node_modules/%40tanstack/react-query/src/usePrefetchInfiniteQuery.tsx
- Command line
-
hf download hf://spaces/AUXteam/UX-agent/frontend/node_modules/@tanstack/react-query/src/usePrefetchInfiniteQuery.tsx
-
curl -L -o usePrefetchInfiniteQuery.tsx https://huggingface.co/spaces/AUXteam/UX-agent/resolve/main/frontend/node_modules/%40tanstack/react-query/src/usePrefetchInfiniteQuery.tsx
647 Bytes
| import { useQueryClient } from './QueryClientProvider' | |
| import type { | |
| DefaultError, | |
| FetchInfiniteQueryOptions, | |
| QueryClient, | |
| QueryKey, | |
| } from '@tanstack/query-core' | |
| export function usePrefetchInfiniteQuery< | |
| TQueryFnData = unknown, | |
| TError = DefaultError, | |
| TData = TQueryFnData, | |
| TQueryKey extends QueryKey = QueryKey, | |
| TPageParam = unknown, | |
| >( | |
| options: FetchInfiniteQueryOptions< | |
| TQueryFnData, | |
| TError, | |
| TData, | |
| TQueryKey, | |
| TPageParam | |
| >, | |
| queryClient?: QueryClient, | |
| ) { | |
| const client = useQueryClient(queryClient) | |
| if (!client.getQueryState(options.queryKey)) { | |
| client.prefetchInfiniteQuery(options) | |
| } | |
| } | |