AI Integration Quick Reference
AI Integration Quick Reference
| Field | Value |
|---|---|
| Package | @cometchat/chat-uikit-react-native |
| Key components | CometChatThreadHeader, CometChatMessageList, CometChatMessageComposer |
| Init | CometChatUIKit.init(UIKitSettings) then CometChatUIKit.login("UID") |
| Entry point | Pass parentMessageId prop to CometChatMessageList and CometChatMessageComposer |
| Sample app | GitHub |
| Related | Message List · Thread Header · All Guides |
Components
| Component / Class | Role |
|---|---|
CometChatThreadHeader | Displays parent message context |
CometChatMessageList | Shows messages filtered by parentMessageId |
CometChatMessageComposer | Input for composing threaded replies |
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 theonThreadRepliesClick 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 usinggoToMessageId prop.
5. Handle Blocked Users in Threads
Show an unblock prompt when the user is blocked instead of the composer.Feature Matrix
| Feature | Component / Prop |
|---|---|
| Display parent message | CometChatThreadHeader with parentMessage prop |
| Show thread replies | CometChatMessageList with parentMessageId prop |
| Compose thread reply | CometChatMessageComposer with parentMessageId prop |
| Navigate to message | goToMessageId prop on CometChatMessageList |
| Thread trigger | onThreadRepliesClick callback on CometChatMessageList |
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.