Skip to content
This repository was archived by the owner on Nov 21, 2025. It is now read-only.

Commit 50364e4

Browse files
committed
docs: add react-native instructions in README
1 parent d9e7dd8 commit 50364e4

File tree

1 file changed

+13
-12
lines changed

1 file changed

+13
-12
lines changed

examples/react-native/README.md

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22

33
Use 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 🙌🏻

0 commit comments

Comments
 (0)