Pavel Polacek3 min

ReasonConf2019 shows evolution of ReasonML

EngineeringBackendMay 20, 2019

EngineeringBackend

/

May 20, 2019

Pavel PolacekBackend Engineer

Share this article

The most interesting talks from ReasonConf 2019? How Ubisoft used ReasonML to build its club app, how to sneak ReasonML into production and how companies can successfully leverage OCaml to meet their business goals.

The main goal of this annual conference is to spread the word through a series of lectures and workshops that Reason, which is similar to React (another Facebook creation), is more than just another niche language.

The program covered a broad range of topics for those new to the Reason World as well as for those who were looking to hone their skill set, including beginner and advanced workshops dedicated to Reason and ReasonReact. The lineup also had sessions that took a look at  Reason, GraphQL and OCaml.

WORKSHOP DAY

We participated in the Advanced ReasonReact Workshop, which was led by Ricky Vetter, a lead Facebook Messenger developer and author of ReasonReact. Messenger was one of the first apps that relied extensively on ReasonML. The workshop, which was co-led by Blaine Bublitz, examined a new syntax and hooks that were released just days before the conference. Vetter introduced us to a different way to build React components as well as how to use the latest version on genType, which automatically shares typings between ReasonML and TypeScript or Flow.

This new syntax can easily create React components:

/* file: Greeting.re */

[@react.component]
let make = (~name) =>
  <button> {ReasonReact.string("Hello " ++ name ++ "!")} </button>;

The syntax creates a React-like experience but is simpler to develop, as ReasonML provides all the exporting and importing out of box. You just need to write the make function, which is equivalent to export default in ES6 JavaScript! You can still call it in same way as you would in React:

/* file: Index.re */

ReactDOMRe.renderToElementWithId(<Greeting name="John" />, "someRootElement");

The new syntax, however, has a few disadvantages. For example, it is better to use useReducer instead of useEffect which does not currently have an optimal typings.

As a starting point, Vetter showed us a repo with a simple project setup before breaking us into small groups to play with the code. The goal was to create an app that would render a given set of data about cities and show them on a map using React-Leaflet.

Each group took a different approach. One group, for example, connected the app with Wikipedia to get even more data and we added feature to create new pins by users.

It was great to be able to collaborate with people who use Reason on a daily basis. The insight Vetter shared, as one of the pioneers and leading contributors of this growing platform, was invaluable.

MAIN CONFERENCE TALKS

Cheng Lou from Facebook opened the conference. He was followed by Amelie Benoit and David Corticchiato from Ubisoft who talked about how they used ReasonML and React Native to build their Ubisoft Club mobile app. It is really nice to see that ReasonML has become not only a platform for language enthusiasts but that it is now attracting the attention of big-name companies that are using it to develop their own apps.

Christoph Knittel was up next. He talked about building an app with ReasonML for the railway industry, which is not known for being a leader in early tech adoption. Knittel was tasked with creating a complex app for processing “written order.” Thanks to the ReasonML compiler and type system, not a single bug was reported during acceptance testing.

The microphone was then handed over to Jeremie Dimino who talked about OCaml and how companies can successfully leverage the platform to meet their business goals.  

If you were wondering how to sneak ReasonML into production, the next talk from Gage Peterson was exactly for you! He also addressed how to introduce language changes within development teams.  

One of the final talks was from Douglas Teoh about how he built a medical application that recognizes strokes. This talk grabbed my attention, as ReasonML was being used for something where a simple error could mean the difference between life and death. This technology certainly has come a long way since first being introduced in 2016.  

Check out all the videos from ReasonConf2019 here.

See Our Open Positions

Share this article



Sign up to our newsletter

Monthly updates, real stuff, our views. No BS.