Jsoo, production use and user facing applications questions

summarizing findings:

  • js_of_ocaml deals with just that - generating js of ocaml; javascript imports and interop is possible through creating bindings to js code
  • you can still pass the output of jsoo to the standard javascript build pipelines (including webpack), for example: Create bindings for JS library · Issue #718 · ocsigen/js_of_ocaml · GitHub
  • I couldn’t find any more complete and more complex examples like using css modules or internationalization, that require “coordination” between both the css files and the js output (I’ll assume there’s nothing existing)

if you want reactive apps:

(the above was disappointing since in my experience building a vdom reactive library takes a lot more effort and energy than people realize. It is not enough to build html diffing logic - there’s all kinds of weird browsers, with quirks, accessibility, touch devices, event handling differences that need to be standardized. These are not fun problems to solve and are ones that reactjs has solved, but less widely used libraries have not)


at first glance, as someone without too much ocaml experience - building a modern reactive browser application with the existing jsoo ecosystem is not that straightforward. especially compared to bucklescript, which was a smoother experience to integrate (at least in terms of tutorials, examples and etc. - these seem to be lacking in jsoo land, so simple things take a good chunk of time to experiment), but also one that is no longer available

1 Like