hey-react-native
v1.0.0
Published
Send message to react-native app from react-native-webview.
Downloads
4
Maintainers
Readme
hey-react-native
Send message to react-native app from react-native-webview.
If not in the react-native-webview, It won't do anything.
Install
npm install hey-react-native
Usage
Please refer to tests.
import { HeyReactNative } from "hey-react-native";
const hey = new HeyReactNative({ debug: true });
hey.emit({ event: 'ping', value: 'pong' });
// => console.log {"event":"ping","value":"pong"}
If you want to specify a event name.
import { HeyReactNative } from "hey-react-native";
const hey = new HeyReactNative<'ping'>({ debug: true });
hey.emit({ event: 'ping', value: 'pong' });
License
hey-react-native is MIT licensed.