Communication API for React Native App

When you embed a react native app into an app you are developing using Quantum Visualizer, the Communication API for the React Native app helps in the interaction between the React Native app and app you are developing using Quantum Visualizer. This feature is available from V8 SP4 onwards.

The following React Native APIs help you in communicating from the React Native app to the Quantum Visualizer app:

Function Description
reactNative.invokeKonyCallback Invokes the Quantum Visualizer callback, which is registered in the Quantum Visualizer app by using the kony.reactNative.setCallback API.
reactNative.setCallback Registers a callback/listener to receive the result/response from the Quantum Visualizer app context.
 

The following APIs from the kony.reactNative namespace help you in communicating from the Quantum Visualizer app to the React Native app:

FunctionDescription
kony.reactNative.setCallback Registers a callback/listener for the incoming request from the React Native app context.
kony.reactNative.sendResultSends a response (for the request) to the React Native app, if the React Native app registers a callback.
 

To set a callback/listener in the React Native app, use the kony.reactNative.setCallback function. On receiving the request, invoke the required function in the React Native app by using the reactNative.invokeKonyCallback function.

Also, set a callback in the Quantum Visualizer app by using the kony.reactNative.setCallback function. The Quantum Visualizer app sends a data request to the React Native app by using the kony.reactNative.sendResult function.

For more information related to the React Native App Integration into Quantum Visualizer App feature, refer these sections: