hey-react-native

1.0.0 • Public • Published

hey-react-native

CI

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.

Package Sidebar

Install

npm i hey-react-native

Weekly Downloads

2

Version

1.0.0

License

MIT

Unpacked Size

7.32 kB

Total Files

11

Last publish

Collaborators

  • hikouki