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

Function QueryClientProvider

packages/solid-query/src/QueryClientProvider.tsx:100–115  ·  view source on GitHub ↗
(
  props: QueryClientProviderProps,
)

Source from the content-addressed store, hash-verified

98 * ```
99 */
100export const QueryClientProvider = (
101 props: QueryClientProviderProps,
102): JSX.Element => {
103 createRenderEffect<() => void>((unmount) => {
104 unmount?.()
105 props.client.mount()
106 return props.client.unmount.bind(props.client)
107 })
108 onCleanup(() => props.client.unmount())
109
110 return (
111 <QueryClientContext.Provider value={() => props.client}>
112 {props.children}
113 </QueryClientContext.Provider>
114 )
115}

Callers

nothing calls this directly

Calls 3

unmountFunction · 0.85
mountMethod · 0.45
unmountMethod · 0.45

Tested by

no test coverage detected