AI Agent Component Spec
AI Agent Component Spec
Overview
This guide shows you how to add emoji reactions to messages usingCometChatReactions. Reactions let users quickly respond to messages with emojis, showing reaction counts and who reacted.
Time estimate: 10 minutesDifficulty: Beginner
Prerequisites
- React.js setup complete
- Messaging configured
- Reactions extension enabled in CometChat Dashboard
Steps
Step 1: Enable Reactions Extension
Reactions are automatically integrated when enabled in the CometChat Dashboard:- Go to your CometChat Dashboard
- Navigate to Extensions
- Enable the โReactionsโ extension
CometChatMessageList.
Step 2: Using Reactions in Message List
Reactions are built into the message list component:Step 3: Standalone Reactions Component
UseCometChatReactions directly for custom message bubbles:
Step 4: Display Reaction Details
Show who reacted withCometChatReactionList:
Complete Example
Full implementation with custom message list:Advanced Configuration
Advanced Configuration
Styling
Customize reaction appearance:Common Issues
| Issue | Solution |
|---|---|
| Reactions not showing | Enable Reactions extension in CometChat Dashboard |
| Canโt add reactions | Check user permissions and message ownership |
| Reactions not updating | Ensure message listeners are properly attached |
| Duplicate reactions | The SDK prevents duplicate reactions from the same user |