# hey-react-native

> Send message to react-native app from react-native-webview.

Latest version **1.0.0** (published 2020-10-24) · MIT license · 0 weekly downloads

## Install

```sh
npm install hey-react-native
pnpm add hey-react-native
yarn add hey-react-native
bun add hey-react-native
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2020-10-24 |
| First published | 2020-10-24 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 7.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | hikouki |
| Maintainers | hikouki |
| Keywords | typescript, react-native, react-native-webview, emit, event, message |

## Links

- npm: https://www.npmjs.com/package/hey-react-native
- Repository: https://github.com/hikouki/hey-react-native
- Homepage: https://github.com/hikouki/hey-react-native#readme
- Issues: https://github.com/hikouki/hey-react-native/issues
- npm.io page: https://npm.io/package/hey-react-native

## Alternatives

- [async-exit-hook](https://npm.io/package/async-exit-hook.md) — 3.7M weekly downloads
- [evnty](https://npm.io/package/evnty.md) — 7.2K weekly downloads
- [eleventy-plugin-asciidoc](https://npm.io/package/eleventy-plugin-asciidoc.md) — 3.5K weekly downloads
- [@jswork/next-get2get](https://npm.io/package/@jswork/next-get2get.md) — 945 weekly downloads
- [@dashersw/axon](https://npm.io/package/@dashersw/axon.md) — 934 weekly downloads

## Recent versions

- 1.0.0 (latest) — 2020-10-24

## README

# hey-react-native

![CI](https://github.com/hikouki/hey-react-native/workflows/CI/badge.svg)

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](https://github.com/hikouki/hey-react-native/blob/main/__tests__/index.spec.ts).

```typescript
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.

```typescript
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](https://github.com/hikouki/hey-react-native/blob/main/LICENSE).

---
_Source: https://npm.io/package/hey-react-native · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
