useChatMessagesEffect

The purpose of useChatMessagesEffect hook is set appropriate message listeners and using callbacks it makes chat messages resource live and reactive

Example Usage:
useChatMessagesEffect({ roomId: "<Room ID>" });

Hook Argument

roomId

TypeDefault
StringNo Default

Hook Return Value

removeMessageListener

Type
Function of type: (arg: IChatRoomArgs, callback: MessageListenerCallback) => Promise