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

Function QueryClientProvider

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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 2

mountMethod · 0.45
unmountMethod · 0.45

Tested by

no test coverage detected