Reason React real-world example app?


#1

Does someone know of any good repos? There’s not a lot of example code for ReasonReact, especially the new version with hooks. At least in the officially listed examples, only one.

It bugs me a bit that ReasonML is such an awesome language but it doesn’t seem to be used a lot out in the world. And most of what I glean in this community is people more interested in pondering theoretical FP questions than writing practical stuff like ReasonReact apps. The React/RN ecosystem and demand is huge and Reason could be a boon for many people and startups, but there’s not a lot of good examples out there for writing a real-world app in Reason. Some of the code I see looks kind of esoteric (patterns I’m not familiar with). I’d be interested in seeing an example of codebases that mixes JS and Reason, because I know mixing it requires creating bindings, which seems like a pain.

Not to complain, I’m also guilty of not rolling up my arms and writing something, just putting my perspective and doubts out there.


#2

The new rewrite of sketch is using hooks. Even though it only has 1 route right now, things will change dramatically in the next month


#3

This is really cool. Only it’s not really a “normal” app. It’s very specific/technical so I’m not sure it helps much with learning the patterns that most apps would care about (navigation, UI elements, modals, GraphQL/Rest, etc.)


#4

veoluz isn’t quite normal, but could be interesting to you https://github.com/jaredly/veoluz


#5

ReasonConf 2018’s website is built with ReasonReact and Gatsby: https://github.com/ReasonVienna/reason-conf


#6

@jaredly that looks cool, I wanted to run but couldn’t check out project (because I’m on windows I guess, I get:
$ git checkout -f HEAD
fatal: cannot create directory at ‘docs/examples/2019-06-14T15:59:04.998Z’: Invalid argument

I’ve failed to run many other open-source projects, but none quite this early :joy:


#7

What happens if you download the zipped version of the project from GitHub and try to unzip it?


#8

Yep, colons are not allowed in Windows paths.


#9

I’d been hoping to answer this question sooner, but the web-app that I’ve been working on for the past few years (!) just went open-source!

We use Reason-React for all of our newest front end work, and we’ve written a lot of Reason code over the course of the past year (> 30% of the total LOC now).

If you’re unfamiliar with Rails, all of the ReasonML goes in the app/javascript path.

We switched to using hooks once that was released, but we haven’t switched all of our old components to JSX3 yet - we expect that’ll happen naturally over time; the old API still works perfectly fine, and we’ve written Jsx2 compatibility modules for a few components that needed to play nicely with older ones.