Skip to content

Commit e5cf128

Browse files
committed
Update README.md
1 parent be53ca4 commit e5cf128

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

README.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,14 +68,20 @@ module.exports = {
6868
babelTransformerPath: require.resolve('react-native-react-bridge/lib/plugin'),
6969
...
7070
},
71+
rnrb: {
72+
// Set `true` if you use Preact in web side.
73+
// This will alias imports from `react` and `react-dom` to `preact/compat` automatically.
74+
preact: true
75+
},
7176
...
7277
};
7378
```
7479

7580
2. Make entry file for web app.
7681

77-
- If you use React in web, import modules from `react-native-react-bridge/lib/web` and `react`.
78-
- If you use Preact in web, import modules from `react-native-react-bridge/lib/web/preact` and `preact`.
82+
- If you use React in web, import modules from `react` and `react-native-react-bridge/lib/web`.
83+
- If you use Preact in web, import modules from `preact` and `react-native-react-bridge/lib/web/preact`.
84+
- If you use Preact in web but with React aliases, import modules from `react` and `react-native-react-bridge/lib/web`.
7985

8086
```jsx
8187
// WebApp.js

0 commit comments

Comments
 (0)