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

Function characterQueryOptions

examples/react/batching/src/index.tsx:20–25  ·  view source on GitHub ↗
(id: number)

Source from the content-addressed store, hash-verified

18})
19
20const characterQueryOptions = (id: number) =>
21 queryOptions({
22 queryKey: ['character', id],
23 queryFn: () => loadCharacter(id),
24 staleTime: 60 * 1000,
25 })
26
27function Characters({ ids }: { ids: Array<number> }) {
28 const characters = useQueries({

Callers 1

CharactersFunction · 0.85

Calls 2

queryOptionsFunction · 0.90
loadCharacterFunction · 0.90

Tested by

no test coverage detected