useWebchat
hook provides access to the Webchat client and its state. It allows you to:
useWebchat
hook is incompatible with the batteries-included <Webchat>
component—using them together will cause issues and unexpected behaviour.If you need to use the hook, make sure you’re manually building Webchat.Events | Description |
---|---|
conversation | Triggered when a new conversation is started. |
message | Triggered when a new message is sent or received. |
error | Triggered when an error occurs. |
webchatVisibility | Triggered when the Webchat visibility changes. (‘show’ or ‘hide’ or ‘toggle’) |
webchatConfig | Triggered when the Webchat configuration changes. |
customEvent | Triggered when a custom event is received. |
isTyping | Triggered when the bot is typing. |