Chat state for meeting text chat.
Contains all chat messages and an unread counter for showing notification badges.
Chat panel with unread badge:
function ChatButton() { const { unreadCount, clearUnread } = useChat(); const [isOpen, setIsOpen] = useState(false); const handleOpen = () => { setIsOpen(true); clearUnread(); }; return ( <button onClick={handleOpen}> Chat {unreadCount > 0 && <span className="badge">{unreadCount}</span>} </button> );} Copy
function ChatButton() { const { unreadCount, clearUnread } = useChat(); const [isOpen, setIsOpen] = useState(false); const handleOpen = () => { setIsOpen(true); clearUnread(); }; return ( <button onClick={handleOpen}> Chat {unreadCount > 0 && <span className="badge">{unreadCount}</span>} </button> );}
Array of chat messages
Number of unread messages
Chat state for meeting text chat.
Remarks
Contains all chat messages and an unread counter for showing notification badges.
Example
Chat panel with unread badge:
See