useMessageFormContext

Read and control state of Thread.MessageForm.
import { useMessageFormContext } from '@superinterface/react' const Submit = () => { const { content, isDisabled } = useMessageFormContext() return <button disabled={isDisabled}>{content.length}</button> }

Returns

PropTypeDescription
contentstringCurrent input value
isDisabledbooleanForm disabled state
isLoadingbooleanWhether a message is pending
filesFileObject[]Attached files
setFiles(files) => voidUpdate attached files
isFileLoadingbooleanTrue while file uploads pending