feat(web): add TanStack Query client singleton
Tuned defaults: retry disabled (we throw typed errors), 30s staleTime to make tab-switch re-navigation feel instant, no refetchOnWindowFocus (users on a music app don't expect spurious network when they tab back).
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
import { QueryClient } from '@tanstack/svelte-query';
|
||||
|
||||
export const queryClient = new QueryClient({
|
||||
defaultOptions: {
|
||||
queries: {
|
||||
retry: false,
|
||||
staleTime: 30_000,
|
||||
refetchOnWindowFocus: false
|
||||
}
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user