Skip to content

Commit

Permalink
Dont refetch on window focus
Browse files Browse the repository at this point in the history
  • Loading branch information
aleda145 committed Aug 2, 2022
1 parent fad1252 commit f6ce779
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion frontend/src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,13 @@ import Preferences from "./Preferences/Preferences";
import PocketBase from "pocketbase";
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";

const queryClient = new QueryClient();
const queryClient = new QueryClient({
defaultOptions: {
queries: {
refetchOnWindowFocus: false,
},
},
});
function App() {
const [token, setToken] = useState();
console.log(token);
Expand Down

0 comments on commit f6ce779

Please sign in to comment.