Unsubscribing to MessagingService events in Headless web messenger with Geneysys SDK In a React App

We are Creating a headless messenger in React with Genesys SDK. We have subscribed to many events mentioned in below documents

The events that we have subscribed are

  • MessagingService.ready
  • MessagingService.sendingMessage
  • MessagingService.messagesReceived

Is there a way, my React app can unsubscribe to these events when the react component unmounts. I don't want any memory leaks in my application. I did not find any documentation regarding the same.

Could you please clarify the same.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.