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
roomId
Type | Default |
---|---|
String | No Default |
Hook Return Value
removeMessageListener
removeMessageListener
Type |
---|
Function of type: (arg: IChatRoomArgs, callback: MessageListenerCallback) => Promise |
Updated about 1 year ago
What’s Next