|
| 1 | +## How to use this template |
| 2 | + |
| 3 | +- ⚠️ **Don't fork this repository.** Use the "Use this template" green GitHub |
| 4 | + button. |
| 5 | +- Put your bindings in `src/ReactNativeXxxxxxxxxx` & rename accordingly or use |
| 6 | + `rescript.json` `"namespace"` field (more on this below), |
| 7 | +- Update all occurences of |
| 8 | + |
| 9 | + - `@rescript-react-native/__template__` |
| 10 | + - `https://github.com/rescript-react-native/__template__` |
| 11 | + - `__template__` |
| 12 | + - `react-native-XXXXXXXXXX` |
| 13 | + - `https://github.com/OWNER/react-native-XXXXXXXXXX` |
| 14 | + - `ReactNativeXxxxxxxxxx`. If you have more than a file exposed, you should |
| 15 | + consider using ReScript custom namespace by adjusting `rescript.json` |
| 16 | + and adding a `"namespace": "react-native-something"` (note that it will be |
| 17 | + converted to `ReactNativeXxxxxxxxxx`) |
| 18 | + |
| 19 | +- Add your `react-native-XXXXXXXXXX` (adjusted) in `peerDependencies` |
| 20 | + & `devDependencies` section |
| 21 | +- Adjust the changelog (and/or clean it) |
| 22 | +- Remove this part ⬆ & keep everything below ⬇ |
| 23 | + |
| 24 | +--- |
| 25 | + |
| 26 | +# `@rescript-react-native/__template__` |
| 27 | + |
| 28 | +[](https://github.com/rescript-react-native/__template__/actions) |
| 29 | +[](https://www.npmjs.com/@rescript-react-native/__template__) |
| 30 | +[](https://forum.rescript-lang.org/) |
| 31 | + |
| 32 | +[ReScript](https://rescript-lang.org) bindings for |
| 33 | +[`react-native-XXXXXXXXXX`](https://github.com/OWNER/react-native-XXXXXXXXXX). |
| 34 | + |
| 35 | +Exposed as `ReactNativeXxxxxxxxxx` module. |
| 36 | + |
| 37 | +`@rescript-react-native/__template__` X.y.\* means it's compatible with |
| 38 | +`react-native-XXXXXXXXXX` X.y.\* |
| 39 | + |
| 40 | +## Installation |
| 41 | + |
| 42 | +When |
| 43 | +[`react-native-XXXXXXXXXX`](https://github.com/OWNER/react-native-XXXXXXXXXX) |
| 44 | +is properly installed & configured by following their installation instructions, |
| 45 | +you can install the bindings: |
| 46 | + |
| 47 | +```console |
| 48 | +npm install @rescript-react-native/__template__ |
| 49 | +# or |
| 50 | +yarn add @rescript-react-native/__template__ |
| 51 | +``` |
| 52 | + |
| 53 | +`@rescript-react-native/__template__` should be added to `bs-dependencies` in your |
| 54 | +`rescript.json`: |
| 55 | + |
| 56 | +```diff |
| 57 | +{ |
| 58 | + //... |
| 59 | + "bs-dependencies": [ |
| 60 | + "@rescript/react", |
| 61 | + "rescript-react-native", |
| 62 | + // ... |
| 63 | ++ "@rescript-react-native/__template__" |
| 64 | + ], |
| 65 | + //... |
| 66 | +} |
| 67 | +``` |
| 68 | + |
| 69 | +## Usage |
| 70 | + |
| 71 | +### Types |
| 72 | + |
| 73 | +#### `ReactNativeXxxxxxxxxx.t` |
| 74 | + |
| 75 | +... |
| 76 | + |
| 77 | +### Methods |
| 78 | + |
| 79 | +#### `ReactNativeXxxxxxxxxx.method` |
| 80 | + |
| 81 | +... |
| 82 | + |
| 83 | +--- |
| 84 | + |
| 85 | +## Changelog |
| 86 | + |
| 87 | +Check the [changelog](./CHANGELOG.md) for more informations about recent |
| 88 | +releases. |
| 89 | + |
| 90 | +--- |
| 91 | + |
| 92 | +## Contribute |
| 93 | + |
| 94 | +Read the |
| 95 | +[contribution guidelines](https://github.com/rescript-react-native/.github/blob/master/CONTRIBUTING.md) |
| 96 | +before contributing. |
| 97 | + |
| 98 | +## Code of Conduct |
| 99 | + |
| 100 | +We want this community to be friendly and respectful to each other. Please read |
| 101 | +[our full code of conduct](https://github.com/rescript-react-native/.github/blob/master/CODE_OF_CONDUCT.md) |
| 102 | +so that you can understand what actions will and will not be tolerated. |
0 commit comments