NO_CHANNEL_NAME_WARNING:"No channel name passed to useChannel. No channel has been subscribed to." = "No channel name passed to useChannel. No channel has been subscribed to."
Subscribe to a channel
param
The name of the channel you want to subscribe to.
typeparam
of channel you're subscribing to. Can be one of Channel or PresenceChannel from pusher-js.
Subscribe to a channel
The name of the channel you want to subscribe to.
of channel you're subscribing to. Can be one of
Channel
orPresenceChannel
frompusher-js
.Instance of the channel you just subscribed to.
const channel = useChannel("my-channel") channel.bind('some-event', () => {})