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

Function App

examples/react/devtools-panel/src/index.tsx:12–24  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

10const queryClient = new QueryClient()
11
12export default function App() {
13 const [isOpen, setIsOpen] = React.useState(false)
14
15 return (
16 <QueryClientProvider client={queryClient}>
17 <Example />
18 <button
19 onClick={() => setIsOpen(!isOpen)}
20 >{`${isOpen ? 'Close' : 'Open'} the devtools panel`}</button>
21 {isOpen && <ReactQueryDevtoolsPanel onClose={() => setIsOpen(false)} />}
22 </QueryClientProvider>
23 )
24}
25
26function Example() {
27 const { isPending, error, data, isFetching } = useQuery({

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected