0
Fork 0
mirror of https://github.com/TanStack/query.git synced 2026-11-18 19:33:22 +00:00
query/docs/framework/solid/reference/functions/QueryClientProvider.md
Wonsuk Choi d169ee8778
docs(*): add property tables and overload overviews to reference pages and keep declared alias names (#11758)
* docs(*): add parameter and result property tables to reference function pages and an overview to overloaded ones

* docs(*): link to the base type's properties when a parameter or result type has no property table

* docs(framework/*/reference): regenerate reference docs

* docs(framework/*/reference): regenerate reference docs

* chore(scripts/generate-docs): restore the 'dirname' import that the merge dropped

* docs(framework/*/reference): regenerate reference docs

* docs(scripts/generate-docs): label overloads in the overview with their declared parameter and return types

* docs(framework/*/reference): regenerate reference docs

* docs(scripts/generate-docs): convert declared intersection types from the source so signatures keep their alias names

* docs(framework/*/reference): regenerate reference docs

* docs(scripts/generate-docs): reword a comment to avoid the unknown word 'inlines'

* docs(scripts/generate-docs): skip a parameter table on overloaded pages when its heading is missing
2026-10-06 02:38:27 +09:00

1.5 KiB

id title
QueryClientProvider QueryClientProvider
function QueryClientProvider(props: QueryClientProviderProps): Element;

Defined in: packages/solid-query/src/QueryClientProvider.tsx:100

Use the QueryClientProvider component to connect and provide a QueryClient to your application. Also calls client.mount()/client.unmount() as this component mounts/unmounts, which subscribes the client to focus/online events (resuming any paused mutations and refetching as needed when the app regains focus or comes back online).

Parameters

props

QueryClientProviderProps

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.

Example

import { QueryClient, QueryClientProvider } from '@tanstack/solid-query'

const queryClient = new QueryClient()

function App() {
  return <QueryClientProvider client={queryClient}>...</QueryClientProvider>
}