[React] [SDK Docs]
I am using the following block of code from the docs to retrieve a channel:
const liveChannel = ChannelRepository.getChannel('channelId');
liveChannel.once('dataUpdated', data => {
//
});
As far as I know, this provides the LiveChannel
object for the given channel Id. But it throws an error if a channel doesn’t exist by that channel Id provided.
How do I check if a channel exists by an id? My intention is to create a channel by a certain Id if it doesn’t already exist.