Skip to main content
Threaded messages let users create sub-conversations by replying to specific messages in group chats. This reduces clutter and keeps discussions focused. Before starting, complete the Getting Started guide.

Components


Integration Steps

1. Thread View Screen

Create a dedicated screen for threaded messages that receives the parent message via navigation params.

2. Trigger Thread View from Messages

In your main messages screen, handle the onThreadRepliesPress callback to navigate to the thread view.

3. Navigation Setup

Configure React Navigation to include the ThreadView screen.

4. Navigate to Specific Message in Thread

Support navigating to a specific message within a thread using goToMessageId prop.

5. Handle Blocked Users in Threads

Show an unblock prompt when the user is blocked instead of the composer.

Thread Subscription

Users can subscribe to a thread to keep getting updates about new replies even when they aren’t actively viewing it, and unsubscribe to stop. This works in both 1-1 and group conversations. The UI Kit surfaces it in two places, both wired out of the box:
  • A bell in CometChatMessageHeader, shown once the header is given a parentMessage.
  • A subscribe / unsubscribe option in the message options of CometChatMessageList.
Both reflect the current subscription state, flip it optimistically on tap, and show a message if the server rejects the change. No wiring is required to make them work.
On React Native the bell is on CometChatMessageHeader, not CometChatThreadHeader. The landed design places it in the thread screen’s top bar rather than in the reply-count row, so parentMessage is what puts the header in thread mode and renders it.

Automatic subscription

Beyond the manual bell and message option, the UI Kit subscribes a user to a thread automatically in a few cases, so people keep getting updates on threads they are actually part of — without having to remember to follow them:
  • Sending a message subscribes you to its thread. Sending a reply inside a thread subscribes you to that thread as well.
  • Being @mentioned in a reply subscribes you, whether the mention is added on a fresh reply or introduced by an edit.
  • A reply from someone else that does not mention you does not subscribe you. You are only pulled in when you author something in the thread or you are mentioned.
These rules apply in real time and across devices, and a change is mirrored to both surfaces whether or not the thread screen is open. A deliberate unsubscribe is remembered and survives a reload, but sending another message in that thread, or being mentioned in it again, re-subscribes you.

Reacting to changes

Pass onThreadSubscriptionChange to the message header to run your own logic when the user subscribes or unsubscribes:

Hiding the controls

Each surface is hidden independently — an integrator may want one and not the other.

Feature Matrix


Next Steps

Message List

Render real-time message threads.

Thread Header

Customize the thread header component.

All Guides

Browse all feature and formatter guides.

Sample App

Full working sample application on GitHub.