diff --git a/README.md b/README.md index 954b1205..36c0385d 100644 --- a/README.md +++ b/README.md @@ -25,9 +25,8 @@ The communication between React app and React Native app will be also simplified - All JS modules (with or without JSX/TypeScript) will be bundled with [esbuild](https://github.com/evanw/esbuild). - **NOTE: Only the edits in the entry file of web will invoke rebuild because of the limitation of [metro](https://github.com/facebook/metro)'s build process.** - Handle communication between React Native and WebView with React hook style - - With `useWebViewMessage` hook, you can subscribe messages from WebView. - - With `useNativeMessage` hook, you can subscribe messages from React Native. - - `emit` function sends message. + - With `useWebViewMessage` hook, you can subscribe messages from WebView sent with `emitToWebView`. + - With `useNativeMessage` hook, you can subscribe messages from React Native sent with `emitToNative`. - Support bundling some assets in web side with [ES6 import syntax](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import) - `.json` is imported as an object, like require in Node.js. - `.txt` and `.md` are imported as string, like [raw-loader](https://github.com/webpack-contrib/raw-loader). @@ -157,7 +156,7 @@ module.exports = (async () => { import React, { useState } from "react"; import { webViewRender, - emit, + emitToNative, useNativeMessage, } from "react-native-react-bridge/lib/web"; // Importing css is supported @@ -179,10 +178,10 @@ const Root = () => {
{data}