This library doesn't follow conventional semver. The version scheme is shown below, and you should track this library accordingly.
<ExpoVersion>.<Major>.<Minor/Patch>
Go into your project root & then install the requirements:
yarn add bs-platform --dev
yarn add @rescript/react rescript-react-native @rescript-bindings/expo
Next, create a file named bsconfig.json at the same level at your package.json with the following content:
{
"name": "my-rescript-expo-app",
"reason": {
"react-jsx": 3
},
"bsc-flags": ["-bs-super-errors"],
"bs-dependencies": ["@rescript/react", "rescript-react-native", "@rescript-bindings/expo"],
"sources": [
{
"dir": "src"
}
],
"suffix": ".bs.js",
"refmt": 3,
"package-specs": {
"module": "es6",
"in-source": true
}
}
Next, add these scripts to your package.json:
"re:build": "bsb -make-world",
"re:watch": "bsb -make-world -w",
"re:build-clean": "bsb -clean-world -make-world",
Finally, make a folder named src
and start writing your Rescript code in there. yarn re:build
will compile the Rescript code in that folder for you to import and use in your Expo app's JS/TS code.
Fork this repo, clone it onto your machine, install run yarn
in the root directory.
Create a branch with feature/
or bugfix/
prefix make changes and open a PR to this repo.
Happy hacking.
Credit: This project is based on the work started in reason-expo
.