MCPcopy
hub / github.com/TanStack/query / Page

Function Page

packages/solid-query/src/__tests__/useInfiniteQuery.test.tsx:69–82  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

67 const states: Array<UseInfiniteQueryResult<InfiniteData<number>>> = []
68
69 function Page() {
70 const state = useInfiniteQuery(() => ({
71 queryKey: key,
72 queryFn: ({ pageParam }) => sleep(10).then(() => pageParam),
73 getNextPageParam: (lastPage) => lastPage + 1,
74 initialPageParam: 0,
75 }))
76
77 createRenderEffect(() => {
78 states.push({ ...state })
79 })
80
81 return null
82 }
83
84 render(() => (
85 <QueryClientProvider client={queryClient}>

Callers

nothing calls this directly

Calls 12

sleepFunction · 0.90
setActTimeoutFunction · 0.90
refetchFunction · 0.85
fetchNextPageMethod · 0.80
fetchPreviousPageMethod · 0.80
refetchMethod · 0.80
toStringMethod · 0.80
fetchItemsWithLimitFunction · 0.70
fetchItemsFunction · 0.70
useInfiniteQueryFunction · 0.50
setQueryDataMethod · 0.45
invalidateQueriesMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…