Setup React Query Dev Tools

Last updated on 29 Jul, 2021

React Query Dev Tools helps in debugging. It can show us the different queries and their state. In order to use React Query Dev Tools, first we need to import it.

import { ReactQueryDevtools } from "react-query/devtools";

Next we can directly put the <ReactQueryDevtools /> inside QueryClientProvider to make it working.

<QueryClientProvider client={queryClient}>
  <GitUsers />
  <ReactQueryDevtools />

Adding the Dev Tools in the root enables it. After doing all these, if we navigate to our project in browser, we can see the floating React Query icon. Clicking that opens up the debugger.

React Query Dev Tools