For me a big strength is Reason's intolerance of null, this has eliminated a great number of bugs for me. Reason React ultimately forces you to think about every permutation of state your component might enter, and develop logic to handle that. JS/TS will never help you with that.
What do you mean? Typescript by default assumes non-null, and if you specify that something can be null it'll force you to check that it isn't before attempting to access it.
Reason React 0.8
61–70 of 85 posts
Re: Reason React 0.8
#62For me a big strength is Reason's intolerance of null, this has eliminated a great number of bugs for me. Reason React ultimately forces you to think about every permutation of state your component might enter, and develop logic to handle that. JS/TS will never help you with that.
What do you mean? Typescript by default assumes non-null, and if you specify that something can be null it'll force you to check that it isn't before attempting to access it.
Re: Reason React 0.8
#63Re: Reason React 0.8
#64Re: Reason React 0.8
#65Earlier quoted context omitted.
This meritocratic model is unfortunately not really how language popularity plays out in the real world. At least not on career-length timescales.
Was referring to Facebook usage only, like in, why isn't it used more at FB?
Re: Reason React 0.8
#66Edit The gap between https://redex.github.io/ and type.d seems like a challenge
Re: Reason React 0.8
#67Hey there, is there a `styled-components` library for Reason? I'm really considering ReasonML for my app, however I'm not a big fan of the styling in reason react.
Hey, I recommend sticking to bs-css ( https://github.com/reasonml-labs/bs-css ). Not because I don't think styled-ppx is super cool or amazing, but because it's so cutting edge your 99% chance going to run into an edge case that isn't well accounted for yet (I had a number of issues when I tried it). bs-css is battle tested today, so if you're goal is stability, I recommend it first.
I'm doing great progress on it and don't want to miss something that is crucial for you.
Re: Reason React 0.8
#68Earlier quoted context omitted.
The approach I've been taking is to use ReasonML to model the domain of my application as well as high level components. ReasonML code remains unaware of the styling of the "lower-level" components for the most part, which I write in typescript with styled-components or emotion.
Is there any reason to prefer styled-components over emotion? I did a deep dive on this a few months ago, and found that Emotion supports the same API as SC, while also offering benefits like the `sx` prop, not to mention SSR for "free". It also had a reputation for being faster, but I didn't bother to benchmark it.
Just to clarify and sell a little my ppx, styled-ppx supports the css prop as well, many people prefer that over the component api.
Re: Reason React 0.8
#69Hey there, is there a `styled-components` library for Reason? I'm really considering ReasonML for my app, however I'm not a big fan of the styling in reason react.
I guess this lib would be the closest alternative in a safe statically typed way : https://github.com/davesnx/styled-ppx There's also a nice lib for tailwind : https://github.com/dylanirlbeck/tailwind-ppx
Re: Reason React 0.8
#70Earlier quoted context omitted.
What's the editor support like? TypeScript has industry-leading editor integration with insanely fast response times. I'm always wary of new languages for this reason; I've been burned before by Facebook's own Flow type system.
Reason support in VSCode is very solid.