()
| 1130 | const initialData = { pages: [1, 2, 3, 4], pageParams: [0, 1, 2, 3] } |
| 1131 | |
| 1132 | function List() { |
| 1133 | useInfiniteQuery({ |
| 1134 | queryKey: key, |
| 1135 | queryFn: ({ pageParam }) => |
| 1136 | sleep(50).then(() => { |
| 1137 | fetches++ |
| 1138 | return pageParam * 10 |
| 1139 | }), |
| 1140 | initialData, |
| 1141 | initialPageParam: 0, |
| 1142 | getNextPageParam: (_, allPages) => { |
| 1143 | return allPages.length === 4 ? undefined : allPages.length |
| 1144 | }, |
| 1145 | }) |
| 1146 | |
| 1147 | return null |
| 1148 | } |
| 1149 | |
| 1150 | function Page() { |
| 1151 | const [show, setShow] = React.useState(true) |
nothing calls this directly
no test coverage detected