MCPcopy Create free account
hub / github.com/TanStack/query / Page

Function Page

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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 11

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

Tested by

no test coverage detected