This is documentation for the release candidate Stream Chat React Native SDK v8. For the latest stable version, see the latest version (v7).

SendButton

Component to render the send button with the MessageInput component. This is the default component provided to the prop SendButton on the Channel component.

Props

disabled

True if channel is frozen and disableIfFrozenChannel is true.

Type
Boolean

sendMessage

Sends a composed message within MessageInput component to channel. This function is attached to onPress handler of SendButton. The message optimistically gets added to message list UI first, before actually making API call to server. During this intermediate stage, MessageStatus component will display an indicator for “pending” state.

Type
Function

The function takes an object as a parameter with the following properties:

ParameterDescription
localMessageContains the message data that will be shown in the UI immediately
messageContains the data that will be sent to the backend
optionsContains options for sending/updating the message

© Getstream.io, Inc. All Rights Reserved.