Skip to content

Commit

Permalink
WCMS-22016: Don't re-run queries when browser tab is changed (#243)
Browse files Browse the repository at this point in the history
  • Loading branch information
brdunfield authored Aug 20, 2024
1 parent 279ece8 commit 3d04b81
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/utilities/QueryProvider/QueryProvider.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
import React from 'react';
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";

const queryClient = new QueryClient();
const queryClient = new QueryClient({
defaultOptions: {
queries: {
refetchOnWindowFocus: false,
}
}
});

const withQueryProvider = (WrappedComponent) => (props) => {
return (
Expand Down

0 comments on commit 3d04b81

Please sign in to comment.