DEV Community


Discussion on: Thoughts on migrating to TypeScript and improving the overall quality of the frontend DEV codebase

yawaramin profile image
Yawar Amin

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 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:

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