()
| 1115 | const initialData = { pages: [1, 2, 3, 4], pageParams: [0, 1, 2, 3] } |
| 1116 | |
| 1117 | function List() { |
| 1118 | useInfiniteQuery({ |
| 1119 | queryKey: key, |
| 1120 | queryFn: ({ pageParam }) => |
| 1121 | sleep(50).then(() => { |
| 1122 | fetches++ |
| 1123 | return pageParam * 10 |
| 1124 | }), |
| 1125 | initialData, |
| 1126 | initialPageParam: 0, |
| 1127 | getNextPageParam: (_, allPages) => { |
| 1128 | return allPages.length === 4 ? undefined : allPages.length |
| 1129 | }, |
| 1130 | }) |
| 1131 | |
| 1132 | return null |
| 1133 | } |
| 1134 | |
| 1135 | function Page() { |
| 1136 | const [show, setShow] = React.useState(true) |
nothing calls this directly
no test coverage detected