MCPcopy Create free account
hub / github.com/TanStack/query / makeQueryClient

Function makeQueryClient

examples/preact/ssr/src/makeQueryClient.ts:3–13  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1import { QueryClient } from '@tanstack/preact-query'
2
3export function makeQueryClient() {
4 return new QueryClient({
5 defaultOptions: {
6 queries: {
7 // With SSR, we usually want to set some default staleTime
8 // above 0 to avoid refetching immediately on the client
9 staleTime: 60 * 1000,
10 },
11 },
12 })
13}

Callers 2

RootFunction · 0.90
renderFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected