/reason-react-native

Write your React Native apps with Reason

Primary LanguageOCamlMIT LicenseMIT

🎟 Reason Conf US is happening October 7-8th in Chicago 🎉

Buy tickets or sponsor the event by visiting https://www.reason-conf.us


Reason bindings for React Native

Build Status Version Chat

BuckleScript bindings for React Native allows to use ReasonML with ReasonReact to make your iOS, Android and Web apps.

Getting Started

Check our getting started guide for details.

Documentation

See https://reasonml-community.github.io/reason-react-native.

Contribute

Read the contribution guidelines before contributing.

Changelog

Check the changelog for more informations about recent releases.

Code of Conduct

We want this community to be friendly and respectful to each other. Please read the full text so that you can understand what actions will and will not be tolerated.


🚨 Usage from Git repo

If you use things unreleased from the git repo, you will need to link all folders (packages) that you need at the root of node_modules. The easiest way is to create the symlink you need in your package.json prepare step:

First add this repo as a dep

yarn add https://github.com/reasonml-community/reason-react-native

Next, add this cross-platform symlink tool

yarn add --dev symlink-dir

Then add to you package.json

{
  "scripts": {
    "reason-react-native-monorepo-trick": "symlink-dir ./node_modules/reason-react-native-monorepo/reason-react-native node_modules/reason-react-native && symlink-dir ./node_modules/reason-react-native-monorepo/bs-react-native-jsx3-compat node_modules/bs-react-native-jsx3-compat",
    "prepare": "yarn reason-react-native-monorepo-trick"
  }
}

⚠️ In the example above, we only linked reason-react-native and bs-react-native-jsx3-compat. Be sure to link all the package you have in your bsconfig.json that need to be used from git.

👀 If you find a trick more easy to read/maintain (and still cross-platform), please share it with us via Discord, an issue, or a PR!