Legacy Dev Forum Posts

 View Only

Sign Up

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

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

    Posted 06-05-2025 18:38

    harsha.makam | 2024-09-26 13:09:22 UTC | #1

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

    https://developer.genesys.cloud/commdigital/digital/webmessaging/messengersdk/messengerHeadlessmodeSDK#genesysjs-configuration

    https://developer.genesys.cloud/commdigital/digital/webmessaging/messengersdk/SDKCommandsEvents/messagingServicePlugin

    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.


    system | 2024-10-26 13:09:36 UTC | #2

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


    This post was migrated from the old Developer Forum.

    ref: 29560