by draftbit

draftbit / reason-expo

ReasonML bindings for Expo

135 Stars 19 Forks Last release: about 1 year ago (v34.4.0) MIT License 331 Commits 39 Releases

Available items

No Items, yet!

The developer of this repository has not created any items for sale yet. Need a bug fixed? Help with integration? A different license? Create a request here:

Reason Expo Logo


ReasonML bindings for Expo

NPM version badge


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:

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:

  "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:

  "build-reason": "bsb -make-world",
  "watch-reason": "bsb -make-world -w",
  "build-reason-clean": "bsb -clean-world -make-world",

Finally, make a folder named

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.


Fork this repo, clone it onto your machine, install run

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

Credit: This project is based on the work started in


We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.