Thread

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

Best Practices

  • Render Thread within Channel and pass thread/threadList correctly.
  • Use closeThreadOnDismount to keep channel state in sync.
  • Avoid heavy customization; override MessageList/MessageComposer 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

PropDescriptionType
additionalMessageComposerPropsAdditional props for underlying MessageComposer component.object
additionalMessageListPropsAdditional props for underlying MessageList component.object
additionalMessageFlashListPropsAdditional props for underlying MessageFlashList component.object
autoFocusWhen true, the input auto-focuses on mount. Defaults to true.boolean
clientStream Chat client instance.StreamChat
closeThreadOnDismountCloses thread on dismount. Defaults to true.boolean
disabledWhen true, the underlying input box will be disabled. Defaults to false.boolean
onThreadDismountCalled when Thread unmounts.function
closeThreadUnsets the thread and thread messages in the Channel state.function
loadMoreThreadLoads more messages for the thread. Returns a promise.() => Promise<void>
parentMessagePreventPressBoolean to enable/disable parent message press. Defaults to true.boolean
reloadThreadReloads the thread and thread messages.function
threadCan be a LocalMessage or ThreadType. Setting it indicates a thread is open. Set thread on all Channel components when a thread is open.object
threadInstanceInstance of Thread used to read more data or pass to onThreadSelect.Thread

UI Component Props

PropDescriptionType
MessageListCustom message list component. Defaults to MessageList.ComponentType
MessageComposerCustom message composer component. Defaults to MessageComposer.ComponentType