MCPcopy Create free account
hub / github.com/TanStack/query / Query

Function Query

packages/preact-query/src/__tests__/useIsFetching.test.tsx:29–39  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

27 }
28
29 function Query() {
30 const [ready, setReady] = useState(false)
31
32 useQuery({
33 queryKey: key,
34 queryFn: () => sleep(50).then(() => 'test'),
35 enabled: ready,
36 })
37
38 return <button onClick={() => setReady(true)}>setReady</button>
39 }
40
41 function Page() {
42 return (

Callers

nothing calls this directly

Calls 2

sleepFunction · 0.90
useQueryFunction · 0.50

Tested by

no test coverage detected