Created
March 22, 2019 21:43
-
-
Save littleV/6bc2ea7892f49322293a0b6cdc725e55 to your computer and use it in GitHub Desktop.
An example of how to use BatchedBridge in js code
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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