Skip to content
Source
Sign inSign up
fuko/trytanstackdb.com
Open History to see the last commit

query-client.ts

8 lines329 Bytes

1import { QueryClient } from "@tanstack/react-query";
2​
3/**
4 * One QueryClient for the app. The query collections fetch through it, and
5 * the router gets it as context. TanStack DB only runs in the browser (the
6 * app's routes are `ssr: false`), so a module-level client is fine.
7 */
8export const queryClient = new QueryClient();