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

Function Page

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

Source from the content-addressed store, hash-verified

56 const states: Array<UseInfiniteQueryResult<InfiniteData<number>>> = []
57
58 function Page() {
59 const state = useInfiniteQuery(() => ({
60 queryKey: key,
61 queryFn: ({ pageParam }) => sleep(10).then(() => pageParam),
62 getNextPageParam: (lastPage) => lastPage + 1,
63 initialPageParam: 0,
64 }))
65
66 createRenderEffect(() => {
67 states.push({ ...state })
68 })
69
70 return null
71 }
72
73 renderWithClient(queryClient, () => <Page />)
74

Callers

nothing calls this directly

Calls 10

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

Tested by

no test coverage detected