Provides access to the ChannelContext which contains information about the active channel.
Example
const { activeChannel } = useChannel();function useChannel(): voidProvides information about the active channel, and the means to set a new active channel.
interface ChannelContext { isLoading: boolean; channels: Channel[]; activeChannel: ActiveChannel | undefined; setActiveChannel: (channelId: string) => void; refreshChannels: () => void;}booleanWhether the channels are loading.
Channel[]An array of all available channels.
ActiveChannel | undefinedThe active channel.
(channelId: string) => voidThe function to set the active channel.
() => voidThe function to refresh the channels.