()
| 39 | let renders = 0 |
| 40 | |
| 41 | function Page() { |
| 42 | renders++ |
| 43 | |
| 44 | const [stateKey, setStateKey] = React.useState(key) |
| 45 | |
| 46 | const state = useSuspenseQuery({ |
| 47 | queryKey: stateKey, |
| 48 | queryFn: () => sleep(10).then(() => ++count), |
| 49 | }) |
| 50 | |
| 51 | states.push(state) |
| 52 | |
| 53 | return ( |
| 54 | <div> |
| 55 | <button aria-label="toggle" onClick={() => setStateKey(queryKey())} /> |
| 56 | data: {String(state.data)} |
| 57 | </div> |
| 58 | ) |
| 59 | } |
| 60 | |
| 61 | const rendered = renderWithClient( |
| 62 | queryClient, |
nothing calls this directly
no test coverage detected
searching dependent graphs…