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