MCPcopy
hub / github.com/TanStack/query / QueryClientProvider

Function QueryClientProvider

packages/react-query/src/QueryClientProvider.tsx:29–45  ·  view source on GitHub ↗
({
  client,
  children,
}: QueryClientProviderProps)

Source from the content-addressed store, hash-verified

27}
28
29export const QueryClientProvider = ({
30 client,
31 children,
32}: QueryClientProviderProps): React.JSX.Element => {
33 React.useEffect(() => {
34 client.mount()
35 return () => {
36 client.unmount()
37 }
38 }, [client])
39
40 return (
41 <QueryClientContext.Provider value={client}>
42 {children}
43 </QueryClientContext.Provider>
44 )
45}

Callers

nothing calls this directly

Calls 2

mountMethod · 0.45
unmountMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…