This repository was archived by the owner on Nov 21, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +13
-12
lines changed
Expand file tree Collapse file tree 1 file changed +13
-12
lines changed Original file line number Diff line number Diff line change 22
33Use your React Native components inside docz
44
5- > We're using [ react-native-web] ( https://github.com/necolas/react-native-web ) to make this integration possible. So, maybe you can have some caveats.
5+ > We will use [ react-native-web] ( https://github.com/necolas/react-native-web ) to make this integration possible.
6+ > So you might face some issues if you use other react-native modules.
7+ > Usually, many react-native modules have a web alternative, make sure to alias them too.
68
79## Installation
810
@@ -12,19 +14,18 @@ These packages are required to use React Native with docz:
1214$ yarn add react-native-web react-art
1315```
1416
15- Then, just set the ` --native ` argument with docz script:
16-
17- ``` bash
18- $ docz dev --native
19- $ docz build --native
20- ```
21-
22- Or you can set directly on your ` doczrc.js ` :
17+ Then alias ` react-native ` to ` react-native-web `
2318
2419``` js
25- export default {
26- native: true
20+ // gatsby-node.js
21+ exports .onCreateWebpackConfig = args => {
22+ args .actions .setWebpackConfig ({
23+ resolve: {
24+ alias: {
25+ ' react-native' : ' react-native-web' ,
26+ },
27+ },
28+ })
2729}
2830```
2931
30- That's it 🙌🏻
You can’t perform that action at this time.
0 commit comments