MCPcopy Index your code
hub / github.com/TanStack/query / List

Function List

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

Source from the content-addressed store, hash-verified

1296 const initialData = { pages: [1, 2, 3, 4], pageParams: [0, 1, 2, 3] }
1297
1298 function List() {
1299 useInfiniteQuery(() => ({
1300 queryKey: key,
1301 queryFn: ({ pageParam }) =>
1302 sleep(50).then(() => {
1303 fetches++
1304 return pageParam * 10
1305 }),
1306 initialData,
1307 getNextPageParam: (_, allPages) => {
1308 return allPages.length === 4 ? undefined : allPages.length
1309 },
1310 initialPageParam: 0,
1311 }))
1312
1313 return null
1314 }
1315
1316 function Page() {
1317 const [show, setShow] = createSignal(true)

Callers

nothing calls this directly

Calls 2

sleepFunction · 0.90
useInfiniteQueryFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…