Skip to content

Commit

Permalink
configured queryClient to disable refetch on window focus
Browse files Browse the repository at this point in the history
  • Loading branch information
pramodcog committed Sep 18, 2024
1 parent 6312c82 commit 32c1c49
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,13 @@ export const RevealContext = (props: RevealContextProps): ReactElement => {
const viewer = useRevealFromKeepAlive(props);

const queryClient = useMemo(() => {
return new QueryClient();
return new QueryClient({
defaultOptions: {
queries: {
refetchOnWindowFocus: false
}
}
});
}, []);

if (viewer === null) return <></>;
Expand Down

0 comments on commit 32c1c49

Please sign in to comment.