MCPcopy Create free account
hub / github.com/cloudflare/agentic-inbox / getQueryClient

Function getQueryClient

app/root.tsx:56–64  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

54// leaks cache across SSR requests.
55let browserQueryClient: QueryClient | undefined;
56function getQueryClient() {
57 if (typeof window === "undefined") {
58 // SSR: always create a fresh client per request to prevent cross-user cache leaks
59 return makeQueryClient();
60 }
61 // Browser: reuse the same client across navigations
62 if (!browserQueryClient) browserQueryClient = makeQueryClient();
63 return browserQueryClient;
64}
65
66const KumoLink = forwardRef<
67 HTMLAnchorElement,

Callers

nothing calls this directly

Calls 1

makeQueryClientFunction · 0.85

Tested by

no test coverage detected