
Why ReasonReact is the best way to write React - longqzh
https://medium.freecodecamp.org/psst-heres-why-reasonreact-is-the-best-way-to-write-react-5088d434d035
======
lsiunsuex
> One of Reason’s powerful features is BuckleScript compiler, which takes your
> Reason code, and compiles it to readable and performant JavaScript with
> great dead code elimination.

> If you take a closer look at React, you’ll see that some of its main
> principles are foreign to JavaScript.

> In Reason, we get immutability out of the box. Since it’s based on OCaml,
> the functional programming language, we have such features built into the
> language itself as well. Reason also provides us with a strong type system
> on its own.

So what your saying is - React, even though it "compiles" to JS, wasn't
designed for JS - so lets add another layer called Reason, which is based on /
needs another layer called oCaml, which needs Bucklescript to compile to JS.

I will forever be confused by all the layers of React. I want to write in 1
language for any given part of an application; not half a dozen.

