'config:update' | 'connection:enable' | 'connection:remove' | 'connection:disable'
The type of event to subscribe to messages for
(payload: unknown) => void
A function to be called when the event is triggered, with a payload specific to the event.
xkit.on('connection:enable', () => console.log('connection enabled!'))
xkit.js allows consumers to subscribe to certain events in the library. This can be particularly useful if you are using xkit.js via xkit-catalog.js where you do not control the full lifecycle of connections.
|xkit.js keeps the user's logged in state. When that state changes (e.g. when a user is logged in or out), this event will fire.|
|When a user connects or reconnects, this event will be fired with the updated connection object.|
|When a user removes a connection, this event will be fired with the connection object before it was removed.|
|When a user removes a connection, this event will be fired with the |