Improve queryClient options

This commit is contained in:
Alex Gleason 2025-04-18 12:05:24 -05:00
parent e07e98c882
commit 344f12280c
No known key found for this signature in database
GPG Key ID: 7211D1F99744FBB7

View File

@ -13,7 +13,15 @@ const defaultRelays = [
'wss://ditto.pub/relay', 'wss://ditto.pub/relay',
]; ];
const queryClient = new QueryClient(); const queryClient = new QueryClient({
defaultOptions: {
queries: {
refetchOnWindowFocus: false,
staleTime: 60000, // 1 minute
gcTime: Infinity,
},
},
});
// NOTE: This file should normally not be modified unless you are adding a new provider. // NOTE: This file should normally not be modified unless you are adding a new provider.
// To add new routes, edit the AppRouter.tsx file. // To add new routes, edit the AppRouter.tsx file.