I obviously think that React is awesome. But I have been looking for a
strongly typed language to use together with React for a while now.
The best option I have found is Reason. When you use a language like
best or you end up writing a lot of code making sure that what is passed
to this function really is a number and not a object or a string. Or
that a object have the expected elements and so on. This is something
you can avoid with a strongly typed language. Because all of the checks
are done when you build it, and then there are much fewer things that
can go wrong in run time.
You probably don’t want a strongly typed language for smaller projects,
because it takes more time to work with them. The idea is that you do a
lot of “convert this string to a JSX element” etc.
Reason React is pretty awesome. You can use it almost like you would use
React with some differences. One of them are that you only can have one
component per file. And you do have something like Redux, but it is more
like a combination of the default react state management and Redux;
which unfortunately means that you don’t get something like the Connect
I’m going to use Reason for some of my side projects for now. And I
think I would use it for work projects if I started them today.
Check it out if you like React, but would like something strongly typed.
The introduction of a type system makes it less elegant though. So stick
with React if you want the tool that lets you build stuff as fast as
possible. But it is excellent if you want something that limits the
number of places with runtime errors.