MessageInput Hooks
Publicly available The MessageInput component hooks are the following:
useMessageComposer
Retrieve the corresponding MessageComposer instance.
useMessageComposerHasSendableData
Returns a boolean value signaling whether a message can be composed and sent. The value is automatically updated. Useful for send button enablement.
useAttachmentManagerState
Returns an object with relevant data concerning attachments. The data carried by the object are:
attachmentsavailableUploadSlotsblockedUploadsCountfailedUploadsCountisUploadEnabledpendingUploadsCountsuccessfulUploadsCountuploadsInProgressCount
useCanCreatePoll
Returns a boolean value signaling whether a message can be composed and created. Useful for poll creation forms.
useMessageInputControls
A hook that contributes to the MessageInputContextValue with the following:
handleSubmitonPasterecordingControllertextareaRef
useCooldownTimer
A custom hook where the CooldownTimer component is established. Handles the state logic for the timer and returns this data and the related handler.