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.