function QueryClientProvider(props: QueryClientProviderProps): Element;
Defined in: packages/solid-query/src/QueryClientProvider.tsx:231
Provides the QueryClient and manages its mount lifecycle. On the server
it also registers the cache serializer above; on the client, hooks prime
the cache from their hash-keyed registry entries themselves (see
useBaseQuery) and the provider subscribes the cache's single-flight
consumer: mutation responses carrying a FLIGHT_DATA_SOURCE slice (a
DehydratedState produced by a server collector registered under the
same id) hydrate this client before the mutation's promise resolves.
Subscribing is inert when no server collector exists β the server just
folds nothing β so it is unconditional. One consumer per source: with
nested providers, the innermost mounted one owns the slice.
Parameters#
props#
The client to provide, and the children that get access to it.
props properties#
| Property | Type | Description |
|---|---|---|
children? | JSX.Element | The components that get access to the provided QueryClient. |
client | QueryClient | Required The QueryClient instance to provide. |
Returns#
Element
The provided children, wrapped so they can read the QueryClient via useQueryClient.