Functions
useEvent
- useEvent<D>(channel: Channel | PresenceChannel | undefined, eventName: string, callback: (data?: D) => void): void
-
Type parameters
Parameters
-
channel: Channel | PresenceChannel | undefined
-
eventName: string
-
callback: (data?: D) => void
Returns void
Subscribes to a channel event and registers a callback.