How Do I Hook Onto The Incoming Messaging Event When Using UIKit?

Using just the JS web SDK, I can hook onto the incoming message event for a channel with something that look like:

  let channelHandler =     new sendbirdObject.ChannelHandler();
  channelHandler.onMessageReceived = (channel, message) => {
    console.log(message._sender.userId + ': ' + message.message);
  sendbirdObject.addChannelHandler('GLOBAL_HANDLER', channelHandler);

I just started using the UIKit and I would like to hook onto the on message received event any time any of the conversations displayed in my channel list receives a message.

How do I go about doing this with the UIKit?

@diggtydo You can use the withSendBird() HOC as documented here to get access to the SDK directly.

This post gives a similar example to what you are trying to do:

Given that you’ve already got this figure out the SDK, this should be pretty straightforward for you.

Let us know if that doesn’t take care of it for you.