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