Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/draftbit/reason-expo
ReasonML bindings for Expo
https://github.com/draftbit/reason-expo
android expo ios javascript mobile ocaml react react-native reason reasonml
Last synced: 29 days ago
JSON representation
ReasonML bindings for Expo
- Host: GitHub
- URL: https://github.com/draftbit/reason-expo
- Owner: draftbit
- Created: 2018-03-18T06:26:51.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2023-04-17T11:28:36.000Z (over 1 year ago)
- Last Synced: 2024-09-29T18:05:10.659Z (about 1 month ago)
- Topics: android, expo, ios, javascript, mobile, ocaml, react, react-native, reason, reasonml
- Language: Reason
- Homepage: https://docs.expo.io/
- Size: 2.93 MB
- Stars: 143
- Watchers: 6
- Forks: 22
- Open Issues: 17
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-list - reason-expo
README
reason-expo---
[![NPM version badge](https://img.shields.io/npm/v/reason-expo.svg)](https://www.npmjs.com/package/reason-expo)
## Versioning
This library doesn't follow conventional semver. The version scheme is shown below, and you should track this library accordingly.
`..`
## Getting started
Use the Expo CLI to bootstrap a project with the ReasonExpo template.
```
expo init --template expo-template-reason
```Already have an existing Expo Project? Go into your project root & then install the requirements:
```bash
yarn add bs-platform --dev
yarn add reason-react reason-react-native reason-expo
```Next, create a file named bsconfig.json at the same level at your package.json with the following content:
```json
{
"name": "my-reason-expo-app",
"reason": {
"react-jsx": 3
},
"bsc-flags": ["-bs-super-errors"],
"bs-dependencies": ["reason-react", "reason-react-native", "reason-expo"],
"sources": [
{
"dir": "src"
}
],
"suffix": ".bs.js",
"refmt": 3,
"package-specs": {
"module": "es6",
"in-source": true
}
}
```Next, add these scripts to your package.json:
```json
"build-reason": "bsb -make-world",
"watch-reason": "bsb -make-world -w",
"build-reason-clean": "bsb -clean-world -make-world",
```Finally, make a folder named `src` and start writing your ReasonML code in there. `yarn build-reason` will compile the ReasonML code in that folder for you to import and use in your Expo app's JS/TS code.
## Contributing
Fork this repo, clone it onto your machine, install run `yarn` in the root directory. Start the compiler and Expo test app with `yarn dev` in the root directory, and start hacking away at the files in `packages/reason-expo` and `packages/test`!
_Credit: This project is based on the work started in [`bs-expo`](https://github.com/fxfactorial/bs-expo/)._