Skip to content

Commit 4aa1c80

Browse files
committed
Implement module
1 parent 2995750 commit 4aa1c80

36 files changed

+13234
-13118
lines changed

.github/workflows/check.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,6 @@ jobs:
2222
${{ runner.os }}-node-
2323
2424
- run: npm install
25+
- run: npm run tsc
26+
- run: npm run build
2527
- run: npm run test

README.md

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,22 @@
1-
# react-native-react-bundler
1+
# react-native-react-bridge
22

3-
![check](https://github.com/inokawa/react-native-react-bundler/workflows/check/badge.svg)
3+
![check](https://github.com/inokawa/react-native-react-bridge/workflows/check/badge.svg)
44

5-
[Metro](https://github.com/facebook/metro) plugin to use your [React](https://github.com/facebook/react) components in [React Native](https://github.com/facebook/react-native) app.
6-
7-
Supports RN 0.60+. This may work in previous versions but not confirmed.
5+
An easy way to integrate your [React](https://github.com/facebook/react) app into [React Native](https://github.com/facebook/react-native) app.
86

97
**This is under development**
108

119
## Install
1210

1311
WIP
1412

13+
### Peer dependencies
14+
15+
- react 16.8+
16+
- react-native 0.60+
17+
- react-dom
18+
- react-native-webview
19+
1520
## Usage
1621

1722
WIP

fixtures/app-export-commonjs.jsx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import React from "react";
2+
import { webViewRender } from "react-native-react-bridge/lib/web";
3+
import Comp from "./Component";
4+
5+
const App = () => {
6+
return <Comp />;
7+
};
8+
9+
module.exports = webViewRender(App);

fixtures/app-export-default.jsx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import React from "react";
2+
import { webViewRender } from "react-native-react-bridge/lib/web";
3+
import Comp from "./Component";
4+
5+
const App = () => {
6+
return <Comp />;
7+
};
8+
9+
export default webViewRender(App);

fixtures/app-export-named.jsx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import React from "react";
2+
import { webViewRender } from "react-native-react-bridge/lib/web";
3+
import Comp from "./Component";
4+
5+
const App = () => {
6+
return <Comp />;
7+
};
8+
9+
export const foo = webViewRender(App);

fixtures/app-export-non.jsx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import React from "react";
2+
import { webViewRender } from "react-native-react-bridge/lib/web";
3+
import Comp from "./Component";
4+
5+
const App = () => {
6+
return <Comp />;
7+
};
8+
9+
webViewRender(App);

fixtures/app-import-all.jsx

Lines changed: 0 additions & 8 deletions
This file was deleted.

fixtures/app-import-destructing.jsx

Lines changed: 0 additions & 8 deletions
This file was deleted.

fixtures/app-require-all.jsx

Lines changed: 0 additions & 8 deletions
This file was deleted.

fixtures/app-require-destructing.jsx

Lines changed: 0 additions & 8 deletions
This file was deleted.

0 commit comments

Comments
 (0)