> ## Documentation Index
> Fetch the complete documentation index at: https://cometchat-22654f5b-docs-rn-guide-message-privately.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Events

> Listen to UI Kit events for conversations, users, groups, messages, and calls in React Native UI Kit.

<Accordion title="AI Integration Quick Reference">
  | Field               | Value                                                                                                                                                                                                                    |
  | ------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
  | Package             | `@cometchat/chat-uikit-react-native`                                                                                                                                                                                     |
  | Import              | `import { CometChatUIEventHandler } from "@cometchat/chat-uikit-react-native";`                                                                                                                                          |
  | Conversation events | `ccConversationDeleted`, `ccUpdateConversation`                                                                                                                                                                          |
  | User events         | `ccUserBlocked`, `ccUserUnblocked`                                                                                                                                                                                       |
  | Group events        | `ccGroupCreated`, `ccGroupDeleted`, `ccGroupLeft`, `ccGroupMemberScopeChanged`, `ccGroupMemberKicked`, `ccGroupMemberBanned`, `ccGroupMemberUnbanned`, `ccGroupMemberJoined`, `ccGroupMemberAdded`, `ccOwnershipChanged` |
  | Message events      | `ccMessageSent`, `ccMessageEdited`, `ccMessageDeleted`, `ccMessageRead`, `ccLiveReaction`, plus SDK listener events                                                                                                      |
  | Call events         | `onIncomingCallAccepted`, `onIncomingCallRejected`, `onCallEnded`, `onCallInitiated`, `onOutgoingCallAccepted`, `onOutgoingCallRejected`                                                                                 |
  | UI events           | `ccActiveChatChanged`                                                                                                                                                                                                    |
  | Purpose             | Decoupled communication between UI Kit components — subscribe to events to react to changes without direct component references                                                                                          |
</Accordion>

Events provide decoupled communication between UI Kit components. Components emit events in response to user interactions or state changes, allowing other parts of the application to react without direct component references.

Both Components and Composite Components have the ability to emit events. By emitting events, these components allow other parts of the application to react to changes or interactions, enabling dynamic and interactive behavior within the application.

### CometChatConversationEventListener

`CometChatConversationEventListener` emits events when the logged-in user executes some action on a conversation object.

| Name                  | Description                                                                                                       |
| --------------------- | ----------------------------------------------------------------------------------------------------------------- |
| ccConversationDeleted | This event is triggered when the user successfully deletes a conversation.                                        |
| ccUpdateConversation  | This event is triggered to update a conversation in the conversation list. Takes a Conversation object to update. |

### CometChatUserEventListener

`CometChatUserEventListener` emits events when the logged-in user executes some action on an user object.

It consists of the following events:

| Name            | Description                                                               |
| --------------- | ------------------------------------------------------------------------- |
| ccUserBlocked   | This event is triggered when the user successfully blocks another user.   |
| ccUserUnblocked | This event is triggered when the user successfully unblocks another user. |

### CometChatGroupEventListener

`CometChatGroupEventListener` emits events when the logged-in user executes some action on a group object.

It consists of the following events:

| Name                      | Description                                                                          |
| ------------------------- | ------------------------------------------------------------------------------------ |
| ccGroupCreated            | This event is triggered when the user creates a group successfully                   |
| ccGroupDeleted            | This event is triggered when the group member deletes the group successfully         |
| ccGroupLeft               | This event is triggered when the group member leaves the group successfully          |
| ccGroupMemberScopeChanged | This event is triggered when the group member's scope is updated successfully        |
| ccGroupMemberKicked       | This event is triggered when the group member is kicked                              |
| ccGroupMemberBanned       | This event is triggered when the group member is banned                              |
| ccGroupMemberUnbanned     | This event is triggered when the group member is un-banned                           |
| ccGroupMemberJoined       | This event is triggered when a user joins the group                                  |
| ccGroupMemberAdded        | This event is triggered when a user is added to the group                            |
| ccOwnershipChanged        | This event is triggered when the group ownership is assigned to another group member |

### CometChatMessageEvents

`CometChatMessageEvents` emits events when the logged-in user executes some action on a message object.

It consists of the following events:

| Name                               | Description                                                                                                                |
| ---------------------------------- | -------------------------------------------------------------------------------------------------------------------------- |
| ccMessageSent                      | This event is triggered when the sent message is in transit and also when it is received by the receiver.                  |
| ccMessageEdited                    | This event is triggered when the user successfully edits the message.                                                      |
| ccMessageDeleted                   | This event is triggered when the user successfully deletes the message.                                                    |
| ccMessageRead                      | This event is triggered when the sent message is read by the receiver.                                                     |
| ccLiveReaction                     | This event is triggered when the user sends a live reaction.                                                               |
| onTextMessageReceived              | This event is emitted when the CometChat SDK listener emits a text message.                                                |
| onMediaMessageReceived             | This event is emitted when the CometChat SDK listener emits a media message.                                               |
| onCustomMessageReceived            | This event is emitted when the CometChat SDK listener emits a custom message.                                              |
| onTypingStarted                    | This event is emitted when the CometChat SDK listener indicates that a user has started typing.                            |
| onTypingEnded                      | This event is emitted when the CometChat SDK listener indicates that a user has stopped typing.                            |
| onMessagesDelivered                | This event is emitted when the CometChat SDK listener indicates that messages have been delivered.                         |
| onMessagesRead                     | This event is emitted when the CometChat SDK listener indicates that messages have been read.                              |
| onMessageEdited                    | This event is emitted when the CometChat SDK listener indicates that a message has been edited.                            |
| onMessageDeleted                   | This event is emitted when the CometChat SDK listener indicates that a message has been deleted.                           |
| onTransientMessageReceived         | This event is emitted when the CometChat SDK listener emits a transient message.                                           |
| onInteractionGoalCompleted         | This event is emitted when the CometChat SDK listener indicates that an interaction goal has been completed.               |
| onFormMessageReceived              | This event is emitted when an interactive message of 'form' type is received from the CometChat SDK listener.              |
| onCardMessageReceived              | This event is emitted when an interactive message of 'card' type is received from the CometChat SDK listener.              |
| onSchedulerMessageReceived         | This event is emitted when an interactive message of 'scheduler' type is received from the CometChat SDK listener.         |
| onCustomInteractiveMessageReceived | This event is emitted when an interactive message of 'customInteractive' type is received from the CometChat SDK listener. |

### CometChatCallEvents

`CometChatCallEvents` emits events when the logged-in user executes some action on a call object.

It consists of the following events:

| Name                                        | Description                                             |
| ------------------------------------------- | ------------------------------------------------------- |
| **func** onIncomingCallAccepted(call: Call) | Triggers whenever incoming call is accepted by the user |
| **func** onIncomingCallRejected(call: Call) | Triggers whenever incoming call is rejected by the user |
| **func** onCallEnded(call: Call)            | Triggers whenever the call is ended                     |
| **func** onCallInitiated(call: Call)        | Triggers whenever the call is getting initiated         |
| **func** onOutgoingCallAccepted(call: Call) | Triggers whenever outgoing call is accepted by the user |
| **func** onOutgoingCallRejected(call: Call) | Triggers whenever outgoing call is rejected by the user |

### CometChatUIEventListener

UI events refer to actions or interactions performed by a user within the CometChat UI Kit. These events are triggered when a user interacts with various UI elements, such as buttons, menus, checkboxes, input fields, or any other interactive components.

It consists of the following events:

| Name                | Description                                                                  |
| ------------------- | ---------------------------------------------------------------------------- |
| ccActiveChatChanged | This event is triggered when the user navigates to a particular chat window. |

***

## Next Steps

<CardGroup cols={2}>
  <Card title="Methods" icon="code" href="/ui-kit/react-native/methods">
    Initialize and authenticate with CometChatUIKit
  </Card>

  <Card title="Components Overview" icon="puzzle-piece" href="/ui-kit/react-native/components-overview">
    Explore all available UI components
  </Card>

  <Card title="Conversations" icon="comments" href="/ui-kit/react-native/conversations">
    Display and manage conversation lists
  </Card>

  <Card title="Message List" icon="message" href="/ui-kit/react-native/message-list">
    Display messages in a conversation
  </Card>
</CardGroup>
