ml-in-barcelona / jsoo-react

js_of_ocaml bindings for ReactJS. Based on ReasonReact.
https://ml-in-barcelona.github.io/jsoo-react
MIT License
138 stars 19 forks source link

style: use functions as style key creation mechanism #116

Closed jchavarri closed 2 years ago

jchavarri commented 2 years ago

Fixes #112.

Just as an example, in the prod bundle of example demo app, size goes from 115KB to 103KB 😅

Based on the ideas discussed in #113, and @glennsl additions to poc.

jchavarri commented 2 years ago

@glennsl @davesnx thanks for the review :) I updated the names to be closer to CSS semantics.

but does it add all these functions into the resultant bundle?

No, only what's used. js_of_ocaml is quite efficient in terms of dead-code optimization.