Braze React Native SDK - v21.0.0
    Preparing search index...

    Function subscribeToInAppMessage

    • Call this method to have the SDK publish an "inAppMessageReceived" event containing the in-app message data to the Javascript layer. You can listen to this event with Braze.addListener().

      Parameters

      • useBrazeUI: boolean

        Whether to use the default Braze UI for in-app messages.

      • Optionalcallback: (event: InAppMessageEvent) => void | null

        The method to call when an in-app message is received.

      Returns any

      subscription - If a callback is passed to the function, returns the subscription. When you want to stop listening, call .remove() on the returned subscription. Returns undefined if no callback is provided.