I am unable to use React Query soon I integrated React Query Dev Tools. Before integration of React Query Dev Tools, React Query was working fine. I have pasted my code, looking forward for the resolution.
import "bootstrap/dist/css/bootstrap.css";
import React from "react";
import ReactDOM from "react-dom/client";
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
import { ReactQueryDevtools } from "@tanstack/react-query-devtools";
import App from "./App";
import "./index.css";
const queryClient = new QueryClient();
ReactDOM.createRoot(document.getElementById("root") as HTMLElement).render(
<React.StrictMode>
<QueryClientProvider client={queryClient}>
<App />
<ReactQueryDevtools />
</QueryClientProvider>
</React.StrictMode>
);
Screenshot of error is attached.
Following are dependencies I have installed:
{
"dependencies": {
"@tanstack/react-query-devtools": "4.28",
"@tanstack/react-query": "4.28",
}
}
React Query Dev Tools Component not correctly defined.
It should be like this:
<ReactQueryDevtools />