Skip to main content

Receiving chat messages

The object emits events when new chat messages are received. You can listen for the chatUpdate event to log when a new chat message is received.

const messages = useDyteSelector((m) =>;

Here, the message is of type Message, as defined in introduction. messages is a list of all chat messages in the meeting, which is the same as

When a chat message is received, the list is also updated.

console.log(JSON.stringify(;'chatUpdate', () => {