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

TypeDefault
String (Required)No Default

Hook Return Value

sendChatMessage

Type
Function of type: (messageArgs: ISendMessageArgs) => Promise

deleteChatMessage

Type
Function of type:
({ roomId, chatMessage }: {
roomId: any;
chatMessage: any;
}) => void