Documentation Index
Fetch the complete documentation index at: https://mintlify.com/get-convex/convex-react-query/llms.txt
Use this file to discover all available pages before exploring further.
Create ConvexQueryClient
Initialize the Convex client, the
ConvexQueryClient adapter, and the TanStack QueryClient together. Do this once at the module level, outside any component.The
queryKeyHashFn must be set globally — it cannot be set per-query, so the client can correctly identify and update Convex query cache entries.Wrap your app
Place
ConvexProvider and QueryClientProvider around your application. Both providers are required: ConvexProvider enables Convex hooks like useConvexMutation, while QueryClientProvider makes the TanStack cache available to useQuery.Next steps
Reactive queries
Learn how to use
convexQuery with conditional queries, useSuspenseQuery, and custom options like placeholderData.Mutations & actions
Use
useConvexMutation and useConvexAction with TanStack Query’s useMutation hook.Authentication
Integrate Convex Auth, Clerk, or another auth provider with the query adapter.
API reference
Full reference for
ConvexQueryClient, convexQuery, convexAction, and all re-exported hooks.