re: Thoughts on migrating to TypeScript and improving the overall quality of the frontend DEV codebase VIEW POST

FULL DISCUSSION
 
 

Does ReasonML compile to directly to JavaScript without library overhead in prod?

I'd be open to multiple approaches in different areas if it doesn't add up to more and more bytes needing to be shipped.

 
 

ReasonML compiles to pretty minimal strict ES5 that can at times look hand-written. There is very little library overhead and if you know how, you can cut it out almost entirely. See reasonml.chat/t/writing-javascript... for more details. I'm actually working on a very simple ReasonML library right now that will have no library overhead and can be used trivially by JavaScript callers. The transpiler was designed that way, to enable incremental migration.

This is also a good time to try it out–there's been a new ReasonReact release that supports writing zero-overhead React components, with hooks support: reasonml.github.io/reason-react/bl...

On top of all that, ReasonML output minifies really well with Rollup (dead code elimination).

code of conduct - report abuse