Skip to content

Commit

Permalink
feat(project): set default QueryProvider options
Browse files Browse the repository at this point in the history
  • Loading branch information
ChristiaanScheermeijer committed Aug 2, 2021
1 parent e0b5e94 commit cd7f93a
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/providers/QueryProvider.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
import React from 'react';
import { QueryClient, QueryClientProvider } from 'react-query';

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

type QueryProviderProps = {
children: JSX.Element;
Expand Down

0 comments on commit cd7f93a

Please sign in to comment.