ConnectionStateToast
function ConnectionStateToast(__namedParameters): Element | null;Defined in: packages/react/src/components/connection/ConnectionStateToast.tsx:42
The ConnectionStateToast component displays a toast notification indicating the current connection state of the room.
Parameters
| Parameter | Type |
|---|---|
__namedParameters | ConnectionStateToastProps |
Returns
Element | null
Example
// Basic — show toast feedback for room connection changes.
<VoiceRoom agent={agent}>
<ConnectionStateToast />
</VoiceRoom>
// Advanced — show state text and toast feedback together.
function ConnectionFeedback() {
return (
<VoiceRoom agent={agent}>
<ConnectionState />
<ConnectionStateToast />
<DisconnectButton>Leave</DisconnectButton>
</VoiceRoom>
);
}