You can use the normal OCaml syntax with the main OCaml compiler and the js_of_ocaml compiler. If you just want something in the ecosystem that's boring and reliable these are almost certainly the way to go.
You can use the normal OCaml syntax with the main OCaml compiler and the js_of_ocaml compiler. If you just want something in the ecosystem that's boring and reliable these are almost certainly the way to go.
However, even Js_of_ocaml is suffering a slight complication :P There is the recent release of Brr https://erratique.ch/software/brr/doc/, a Js_of_ocaml library replacement (i.e. you keep the compiler but use this instead of the library that comes with Js_of_ocaml).
I heard good reviews of Brr, but haven't tried it myself yet. We will probably have a Brr full-stack example in Dream, eventually.
Personally, I currently use
- Dream on the server (an ancient version, didn't have time to keep up with Dream development in my own app!).
- Just plain JS and the JS ecosystem on the client.
- ReScript/Melange for compiling a couple files to JS from OCaml so that they can trivially interop with my mostly-JS client.