@rescript-bindings/expo

40.3.2 • Public • Published

rescript-expo

Rescript bindings for Expo


Versioning

This library doesn't follow conventional semver. The version scheme is shown below, and you should track this library accordingly.

<ExpoVersion>.<Major>.<Minor/Patch>

Getting started

Go into your project root & then install the requirements:

yarn add bs-platform --dev
yarn add @rescript/react rescript-react-native rescript-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.

Contributing

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.

Dependencies (0)

    Dev Dependencies (7)

    Package Sidebar

    Install

    npm i @rescript-bindings/expo

    Weekly Downloads

    0

    Version

    40.3.2

    License

    MIT

    Unpacked Size

    119 kB

    Total Files

    72

    Last publish

    Collaborators

    • miruz