The options for the useChatConnection hook.
Optional
A callback that will be called whenever the connection status changes. The listener is removed when the component unmounts.
useChatConnection({ onStatusChange: (change) => { console.log(`Connection changed from ${change.previous} to ${change.current}`); }}); Copy
useChatConnection({ onStatusChange: (change) => { console.log(`Connection changed from ${change.previous} to ${change.current}`); }});
The options for the useChatConnection hook.