Skip to content

Commit

Permalink
chore: setup tanstack-query and devtools
Browse files Browse the repository at this point in the history
  • Loading branch information
HassanBahati committed Nov 3, 2024
1 parent 0d538ae commit f0cb9e7
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 8 deletions.
1 change: 1 addition & 0 deletions react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
},
"dependencies": {
"@tanstack/react-query": "^5.59.8",
"@tanstack/react-query-devtools": "^5.59.17",
"firebase": "^10.14.0",
"react": "^18.3.1",
"react-dom": "^18.3.1"
Expand Down
18 changes: 18 additions & 0 deletions react/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

23 changes: 15 additions & 8 deletions react/src/main.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,17 @@
import { StrictMode } from 'react'
import { createRoot } from 'react-dom/client'
import App from './App.tsx'
import './index.css'
import { StrictMode } from "react";
import { createRoot } from "react-dom/client";
import App from "./App.tsx";
import "./index.css";
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
import { ReactQueryDevtools } from "@tanstack/react-query-devtools";

createRoot(document.getElementById('root')!).render(
const queryClient = new QueryClient();

createRoot(document.getElementById("root")!).render(
<StrictMode>
<App />
</StrictMode>,
)
<QueryClientProvider client={queryClient}>
<App />
<ReactQueryDevtools />
</QueryClientProvider>
</StrictMode>
);

0 comments on commit f0cb9e7

Please sign in to comment.