Reputation: 1656
I'm having a problem setting up my new project bootstrapped with Vite,
No QueryClient set, use QueryClientProvider to set one
The project crash when I add the component ReactQueryDevtools
to the code. I tried bootstrapping an app with create-react-app
and it worked with exactly the same code.
src/App.jsx :
import { QueryClient, QueryClientProvider } from "react-query";
import { ReactQueryDevtools } from "react-query/devtools";
import "./App.css";
const queryClient = new QueryClient();
function App() {
return (
<QueryClientProvider client={queryClient}>
<ReactQueryDevtools initialIsOpen={false} />
<h1>Root</h1>
</QueryClientProvider>
);
}
export default App;
Upvotes: 4
Views: 5660
Reputation: 28938
It's an open issue related to the devtools. We are tracking it here: https://github.com/tannerlinsley/react-query/issues/1936
Upvotes: 1