How to use the React Native Bridge in JavaScript



To provide a React Native App Developer with details on how to use the React Native Bridge to enable communication between React Native and the Bubbl Plugin.



React Native App Developer

import { NativeModules } from 'react-native';
module.exports = NativeModules.BubblSdk;

Replace <YOUR API KEY> in the following code with your company's Bubbl API Key.

import BubblSdk from './BubblSdk';

if (Platform.OS === 'android') {
	BubblSdk.initialize('','<YOUR API KEY>');
} else {
  NativeModules.BubblSdk.initialize('','<YOUR API KEY>');