Getting Started

Reason React Native is a safe & simple way to build React Native apps, in Reason, using ReasonReact.

Why Reason React Native ?

By leveraging the ReasonML great type system, expressive language features and smooth interoperability with JavaScript (thanks to ReScript, Reason React Native provide bindings for React Native features as components & APIs that are:

Safe and statically typed

Simple and lean

Familiar and easy to insert into an existing React Native codebase

It is often said that writing ReactJS code feels like "just using JavaScript". The same applies to Reason React with Reason React Native: you will feel like you are "just using Reason".

How to use Reason React Native ?

Like ReasonReact, Reason React Native is a ReasonML package that exposes bindings for React Native.

On your side, you write Reason code that use the ReactNative module exposed by reason-react-native package that you will find on npm.

ReScript will compile this code to safe JavaScript that React Native can consume like standard JavaScript.

If you are familiar with Flow or TypeScript, you can see Reason as the next level of strongly typed JavaScript.

In short, you write safer code that will be compiled to safe JavaScript & end up with a safer React Native app!

Zero-Cost

What is awesome about Reason React Native bindings is that they don't introduce an additional cost. The JavaScript code produced by ReScript will directly hit React & React Native JavaScript implementation, without any extra runtime & bundle cost.

Using Reason & Reason React

Reason React Native is a package that works with Reason & use Reason React. For this reasons (!), if you are unfamiliar with one of these two, we encourage you to have a look to their documentations as soon as you don't find an answer you might have here.

And one day or another, you will also have to look for answers on ReScript, our Reason-to-JavaScript compiler.

Further reading