API Reference
useConvexController
Reference for the advanced controller used for delayed connection, reconfiguration, and explicit disconnect flows.
useConvexController returns the advanced runtime controller from vue-convex/advanced.
Import
import { useConvexController } from 'vue-convex/advanced'
In Nuxt, the same types and functions are available through #convex/advanced.
Signature
function useConvexController(): {
options: Readonly<Ref<ResolvedConvexVueOptions>>
status: Readonly<Ref<'connected' | 'disconnected'>>
connect: (options: { url: string, clientOptions?: ConvexClientOptions, server?: boolean }) => void
reconfigure: (options: Partial<{ url: string, clientOptions?: ConvexClientOptions, server?: boolean }>) => void
disconnect: () => void
getClient: () => ConvexClient | undefined
getHttpClient: () => ConvexHttpClient | undefined
}
Behavior
connect()requires a URLreconfigure()requires that a URL is already configureddisconnect()clears the clients and resets auth state- In the browser,
connect()creates both the HTTP client and realtime client