Function: useMastraChat()
useMastraChat<
TValues>(options?):Omit<ChatViewProps,"className">
Headless driver for the Mastra chat experience. Owns the full
conversation lifecycle (streaming, tool-event tracking, approvals,
model selection, clear, and infinite-scroll-up history) over
@mastra/client-js and returns the exact prop bag ChatView
consumes. Use this when you want the drop-in behaviour but need to
render the view yourself; otherwise reach for MastraChat.
Type Parameters
Section titled “Type Parameters”TValues
Section titled “TValues”TValues extends Record<string, unknown> = Record<string, unknown>
Parameters
Section titled “Parameters”options?
Section titled “options?”UseMastraChatOptions<TValues> = {}
Returns
Section titled “Returns”Omit<ChatViewProps, "className">