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

Function QueryClientProvider

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

Source from the content-addressed store, hash-verified

52}
53
54export const QueryClientProvider = (
55 props: QueryClientProviderProps,
56): JSX.Element => {
57 createRenderEffect<() => void>((unmount) => {
58 unmount?.()
59 props.client.mount()
60 return props.client.unmount.bind(props.client)
61 })
62 onCleanup(() => props.client.unmount())
63
64 return (
65 <QueryClientContext.Provider value={() => props.client}>
66 {props.children}
67 </QueryClientContext.Provider>
68 )
69}

Callers

nothing calls this directly

Calls 2

mountMethod · 0.45
unmountMethod · 0.45

Tested by

no test coverage detected