Callstack’s take on React Native at a scale

At Callstack, we keep challenging ourselves on how to write better mobile apps in a cross-platform way. In fact, it is our mission to help you and companies to launch their products for everyone, at the same time.

For the past few months we have been experimenting with Reason at Callstack. We were so excited by the opportunities it gives when it comes to developing mobile apps that we wanted to share our excitement with the community!

As a first step, we focused on making the on-boarding process as easy as possible.

All in all, it shouldn’t be any harder to use React Native with other languages than Javascript. As a next step, we created a special Reason project template that can be used with react-native init to make a different than standard Hello World application out of the box.

That was just the beginning.


Today, we are really happy to announce an initial release of Rebolt — our take on developing React Native applications in Reason. Initially started as a fork of bs-react-native , it became an independent project as differences in both APIs and future roadmap started to become noticeable.

It ships with bindings to almost all React Native APIs and contains minor, but backwards-compatible, differences focused on developer’s efficiency. That means the upgrade path from bs-react-native should be rather trivial and free from any advanced code modifications.

Why forking?

First stable release of Rebolt (v1) will always be a fork of bs-react-native, that is, bindings to React Native with a slightly different API. We will continue to maintain that version for foreseeable future and keep it up to date as new React Native versions get released.

We decided to fork the project to be able to accelerate its development in accordance with our view on its future. We would like to thank all 44 contributors that spent their time to make what bs-react-native became at the time of our fork. The whole project is still MIT licensed and we are more than happy to see our work back-ported, forked and improved further by the community.

The future of Rebolt

We have ambitious plans for the next release of Rebolt (v2) that we plan to announce later this fall (hint: React Native EU that we organise at Callstack is naturally aspirated date for such announcement to happen. Make sure you have your ticket). As an open-source first company, the entire development will be done in public, including meeting notes and roadmap. You can subscribe to our repository to track further updates and join our Discord to stay up to date. You are all invited to contribute!

Long story short, our plan is to create a whole-new framework written in Reason that shares native part with React Native (hence it is fully compatible with React Native existing ecosystem). Functional capabilities of Reason and its OCaml build environment make it a really interesting playground for experimenting with native development. We want to keep the things that JavaScript does well and replace the bad parts with Reason and use its power (native compilation) to solve the problems that react native can’t solve because JS. We will keep exploring those ideas in the repository while we complete our work on the v1 of Rebolt.

Given the absence of Javascript, Rebolt is going to use Haul — alternative packager for React Native, developed at Callstack — for bundling your source code. It’s based on Webpack and provides much more universal workflow than Metro bundler. Community is already using it for bundling their web and mobile applications and it’s yet another building block to make our vision real.

It is also going to feature a whole-new command line tool that is easy to get started and offer beautiful DX across available commands. This is what rnpm was meant to be from the very beginning. I never managed to finish it with Kureev Alexey and the only part that we created, linkcommand, was merged to the core and became react-native link. We now wanted to use this as an opportunity to improve link itself to support latest native capabilities that were developed over the course of past 3 years inside React Native repository. We also want to make the experience working with native code more seamless, bringing it closer to CRNA or Expo, but without 3rd party software. This part is going to be compatible with React Native (in Javascript) as well. That means, regardless of your view on Reason, you still going to get a whole-new experience when it comes to building mobile apps.

Promises, promises

We know the plan is ambitious. Everything that we do is defined by our mission. We want to make the cross-platform development as easy and stable as possible, learning from our experience in this field and from what other companies have recently shared.

We hope that Reason is what brings us closer to achieving this goal. If Rebolt does not make it happen, I will not consider this as a failure. It’s going to be a sign that there is a better alternative on the market for solving that problem.

And we will keep chasing that solution.

No Comments