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

Thread

Renders thread replies for a message, with an input for new replies. Internally uses MessageList and MessageInput.

Best Practices

  • Render Thread within Channel and pass thread/threadList correctly.
  • Use closeThreadOnDismount to keep channel state in sync.
  • Avoid heavy customization; override MessageList/MessageInput only when needed.
  • Keep thread input focused only when appropriate (autoFocus).
  • Use reloadThread/loadMoreThread instead of manual pagination.

General Usage

import {
  OverlayProvider,
  Chat,
  Channel,
  Thread,
} from "stream-chat-react-native";

const App = () => {
  return (
    <OverlayProvider>
      <Chat client={client}>
        <Channel channel={channel} thread={message} threadList>
          <Thread />
        </Channel>
      </Chat>
    </OverlayProvider>
  );
};

Props

additionalMessageInputProps

Additional props for underlying MessageInput component.

Type
Object

additionalMessageListProps

Additional props for underlying MessageList component.

Type
Object

additionalMessageFlashListProps

Additional props for underlying MessageFlashList component.

Type
Object

autoFocus

When true, the input auto-focuses on mount.

TypeDefault
Booleantrue

client

Stream Chat client instance.

closeThreadOnDismount

Closes thread on dismount, defaults to true.

TypeDefault
Booleantrue

client

Stream Chat client instance.

disabled

When true, the underlying input box will be disabled.

TypeDefault
Booleanfalse

onThreadDismount

Called when Thread unmounts.

Type
Function

closeThread

Unsets the thread and thread messages in the Channel state.

Type
Function

loadMoreThread

Loads more messages for the thread. Returns a promise.

Type
() => Promise<void>

parentMessagePreventPress

Boolean to enable/disable parent message press.

TypeDefault
Booleantrue

reloadThread

Reloads the thread and thread messages.

Type
function

thread

Can be a LocalMessage or ThreadType. Setting it indicates a thread is open. Both types are interchangeable.

With Thread, this displays the thread. With the standard MessageList, it keeps singleton components in OverlayProvider in sync.

Set thread on all Channel components when a thread is open.

Type
object

threadInstance

Instance of Thread used to read more data or pass to onThreadSelect.

Type
Thread

UI Component Props

MessageList

TypeDefault
ComponentTypeMessageList

MessageInput

TypeDefault
ComponentTypeMessageInput