Skip to content

Commit c72dc0d

Browse files
committed
Update README.md
1 parent 00756b6 commit c72dc0d

File tree

1 file changed

+16
-6
lines changed

1 file changed

+16
-6
lines changed

README.md

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,18 @@ The communication between React app and React Native app will be also simplified
1616

1717
<img src="./examples/ios.gif" height="500px" /> <img src="./examples/android.gif" height="500px" />
1818

19+
## Features
20+
21+
- Create React app bundle for WebView automatically in build process of React Native
22+
- `.js`, `.ts`, `.jsx`, `.tsx` will be packed into one source.
23+
- Handle communication between React Native and WebView with React hook style
24+
- Support bundling some assets in web side with ES6 import syntax
25+
- `.json` is imported as an object, like require in Node.js.
26+
- `.css` is injected to the HTML head of WebView, like [css-loader](https://github.com/webpack-contrib/css-loader).
27+
- `.bmp`, `.gif`, `.png`, `.jpg`, `.jpeg`, `.webp` and `.svg` are loaded as base64 encoded url, like [url-loader](https://github.com/webpack-contrib/url-loader).
28+
29+
If you have some feature requests or improvements, please create a [issue](https://github.com/inokawa/react-native-react-bridge/issues) or [PR](https://github.com/inokawa/react-native-react-bridge/pulls).
30+
1931
## Install
2032

2133
```sh
@@ -56,8 +68,10 @@ import {
5668
emit,
5769
useSubscribe,
5870
} from "react-native-react-bridge/lib/web";
59-
// Import css is supported
71+
// Importing css is supported
6072
import "./example.css";
73+
// Images are loaded as base64 encoded string
74+
import image from "./foo.png";
6175

6276
const Root = () => {
6377
const [data, setData] = useState("");
@@ -69,6 +83,7 @@ const Root = () => {
6983
});
7084
return (
7185
<div>
86+
<img src={image} />
7287
<div>{data}</div>
7388
<button
7489
onClick={() => {
@@ -123,11 +138,6 @@ const App = () => {
123138

124139
4. Start your React Native app!
125140

126-
## Limitations
127-
128-
- In web side, `.js`, `.ts`, `.jsx`, `.tsx`, `.css` and `.json` are currently supported extensions.
129-
- If you have some feature requests or improvements, please create a [issue](https://github.com/inokawa/react-native-react-bridge/issues).
130-
131141
## Demo
132142

133143
This repository includes demo app.

0 commit comments

Comments
 (0)