useChatMessageActions
The purpose of useChatMessageActions hook is to abstract out our store actions and exposes actions handlers responsible for updating store value.
Example usage
const { sendChatMessage, deleteChatMessage } = useChatMessageActions({
roomId: "<Room ID>"
});Hook Argument
roomId
roomId| Type | Default |
|---|---|
| String (Required) | No Default |
Hook Return Value
sendChatMessage
sendChatMessage| Type |
|---|
| Function of type: (messageArgs: ISendMessageArgs) => Promise<void> |
deleteChatMessage
deleteChatMessage| Type |
|---|
Function of type: ({ roomId, chatMessage }: { roomId: any; chatMessage: any; }) => void |
Updated 2 months ago
What’s Next
