Skip to main content
Version: v4

Thread

Component to render thread replies for a message, along with and input box for adding new thread replies. This component internally uses MessageList and MessageInput components.

Basic Usage

<OverlayProvider>
<Chat client={client}>
<Channel channel={channel} thread={messageId} threadList>
<Thread />
</Channel>
</Chat>
</OverlayProvider>

Props

additionalMessageInputProps

Additional props for underlying MessageInput component.

Type
object

additionalMessageListProps

Additional props for underlying MessageList component.

Type
object

autoFocus

When true, input box will be auto focused upon mounting.

TypeDefault
booleantrue

overrides the value from ChatContext
client

Instance of StreamChat client.

Type
StreamChat

overrides the value from ThreadContext
closeThread

Unsets the thread and thread messages in the Channel state.

Type
function

disabled

When true, the underlying input box will be disabled.

TypeDefault
booleanfalse

overrides the value from ThreadContext
loadMoreThread

Loads more messages for the thread. Returns a promise.

Type
() => Promise<void>

onThreadDismount

Function which gets called when Thread component un-mounts.

Type
function

overrides the value from ThreadContext
reloadThread

Reloads the thread and thread messages.

Type
function

overrides the value from ThreadContext
thread

A message object that when set indicates a thread is open. When used with the Thread component this will display the thread. When used with the standard MessageList component this will prevent any singleton components in the OverlayProvider form getting out of sync.

note

thread should be set on all Channel components when a thread is open.

Type
object

Did you find this page helpful?