- File-based routing with tanstack router
- Persist top-level navigation state in url, even for most legacy pages
- Striving for an intuitive and simple folder structure where
route-related code is colocated, but the amount of files is still
kept to a minimum
- Replace native fetch with `ky`
- Familiar api, but more polished
13 lines
267 B
TypeScript
13 lines
267 B
TypeScript
import { QueryClient } from '@tanstack/react-query';
|
|
|
|
export function createAppQueryClient() {
|
|
return new QueryClient({
|
|
defaultOptions: {
|
|
queries: {
|
|
retry: 1,
|
|
refetchOnWindowFocus: false,
|
|
staleTime: 10_000,
|
|
},
|
|
},
|
|
});
|
|
}
|