|
4 | 4 | [](https://www.npmjs.com/@reason-react-native/netinfo) |
5 | 5 | [](https://reason-react-native.github.io/discord/) |
6 | 6 |
|
7 | | -Reason / BuckleScript bindings for |
8 | | -[`@react-native-community/netinfo`](https://github.com/react-native-community/react-native-netinfo) |
9 | | -(exposed as `ReactNativeNetInfo`). |
| 7 | +[ReScript](https://rescript-lang.org) / [Reason](https://reasonml.github.io) bindings for |
| 8 | +[`@react-native-community/netinfo`](https://github.com/react-native-netinfo/react-native-netinfo). |
10 | 9 |
|
11 | | -## Support |
| 10 | +Exposed as `ReactNativeNetInfo` module. |
12 | 11 |
|
13 | | -`@reason-react-native/netinfo` X.y._ means it's compatible with |
14 | | -`@react-native-community/netinfo` X.y._ |
15 | | - |
16 | | -| version | react-native version | |
17 | | -| ------- | -------------------- | |
18 | | -| 4.1.0+ | 0.60.0+ | |
19 | | - |
20 | | -For 0.59-, you should use |
21 | | -[`jetify -r`](https://github.com/mikehardy/jetifier/blob/master/README.md#to-reverse-jetify--convert-node_modules-dependencies-to-support-libraries). |
| 12 | +`@reason-react-native/netinfo` X.y.\* means it's compatible with |
| 13 | +`@react-native-community/netinfo` X.y.\* |
22 | 14 |
|
23 | 15 | ## Installation |
24 | 16 |
|
25 | | -With `yarn`: |
26 | | - |
27 | | -```console |
28 | | -yarn add @reason-react-native/netinfo |
29 | | -``` |
30 | | - |
31 | | -With `npm`: |
| 17 | +When |
| 18 | +[`@react-native-community/netinfo`](https://github.com/react-native-netinfo/react-native-netinfo) |
| 19 | +is properly installed & configured by following their installation instructions, |
| 20 | +you can install the bindings: |
32 | 21 |
|
33 | 22 | ```console |
34 | 23 | npm install @reason-react-native/netinfo |
| 24 | +# or |
| 25 | +yarn add @reason-react-native/netinfo |
35 | 26 | ``` |
36 | 27 |
|
37 | | -If you use React Native 0.60, `@react-native-community/netinfo` should be linked |
38 | | -to your project: |
39 | | - |
40 | | -```console |
41 | | -react-native link @react-native-community/netinfo |
42 | | -``` |
43 | | - |
44 | | -Finally, `@reason-react-native/netinfo` should be added to `bs-dependencies` in |
45 | | -`BuckleScript` configuration of the project (`bsconfig.json`). For example: |
| 28 | +`@reason-react-native/netinfo` should be added to `bs-dependencies` in your |
| 29 | +`bsconfig.json`: |
46 | 30 |
|
47 | 31 | ```diff |
48 | 32 | { |
49 | 33 | //... |
50 | 34 | "bs-dependencies": [ |
51 | 35 | "reason-react", |
52 | 36 | "reason-react-native", |
| 37 | + // ... |
53 | 38 | + "@reason-react-native/netinfo" |
54 | 39 | ], |
55 | 40 | //... |
|
0 commit comments