Listen for when Webchat opens, closes, raises an error, and more.
window.botpress.init
(the function in the second inject script) finishes its execution.
useWebchat
hook’s returned on
value to listen to events. Just add the following code at the top level of your Webchat implementation:
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.