File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff 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
75802 . 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
You can’t perform that action at this time.
0 commit comments