Skip to content

Instantly share code, notes, and snippets.

@littleV
Created March 22, 2019 21:43
Show Gist options
  • Save littleV/6bc2ea7892f49322293a0b6cdc725e55 to your computer and use it in GitHub Desktop.
Save littleV/6bc2ea7892f49322293a0b6cdc725e55 to your computer and use it in GitHub Desktop.
An example of how to use BatchedBridge in js code
import BatchedBridge from "react-native/Libraries/BatchedBridge/BatchedBridge";
import AppRegistry from 'react-native';
export class CommonInterface {
helloworld(message) {
alert("Hello World\n" + message);
}
}
const exposed = new CommonInterface();
BatchedBridge.registerCallableModule("CommonInterface", exposed);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment