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 for your framework.

Components


Integration Steps

1. Thread State Management

Store the parent message that the user clicked “Reply in Thread” on. When set, update the app state to show the threaded messages side panel. File: CometChatHome.tsx

2. Thread Trigger in Group Messages

Wire the onThreadRepliesClick callback on CometChatMessages. When a user clicks the thread reply icon on any message, this fires with the parent message object. File: CometChatHome.tsx

3. Threaded Messages Component

Render the thread panel with the parent message, reply list, and composer. goToMessageId and searchKeyword support in-thread search navigation. File: CometChatHome.tsx

4. App State Management

Add reducer cases to store the threaded message and control the side panel visibility. These are dispatched by updateThreadedMessage in step 1. File: appReducer.ts

Implementation Flow

Fetch the parent message, load replies, send new replies, and handle live updates:
When the composer is blocked (e.g. permissions), show a fallback:

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.