I’ve used CLJS to write several web apps over the past few years, and before that I worked with JS and TypeScript. I’d highly recommend using CLJS, IMO it’s still miles ahead of JS. In addition to the reasons you listed, I’d also consider:
-
re-framegives you a fully data-driven architecture, parts of which are difficult to implement in JS (e.g. expressing effects as data). - DataScript is extremely good for storing your app state. I’m not aware of anything analogous for JS.
- CLJS has a much simpler build system than JS. On every JS project I’ve worked on, I’ve had to fight the build system at least a little bit, but I’ve never had any problems in CLJS.
- There is far less churn in the CLJS ecosystem.
re-frameis now 5 years old, and AFAIK hasn’t changed fundamentally in that time. -
clojure.specis excellent for verifying your app state is always correct, and can be used to check constraints that are difficult/impossible to express in a type system (e.g. that a value should always be an integer above 0). - Since you’re using Clojure on the backend, you can share code between the backend and the frontend. This can be very useful for things like specs and validation.
I’d also echo what @didibus said about the advantages of learning CLJS. It’ll give you a new perspective on front end development, and make you a better JS programmer.
From what I understand of hooks, they’re a way of using local state in your components without having to use the JS class syntax. Since both Fulcro and re-frame advise that you to keep all your app state in a single place, it shouldn’t be necessary to use hooks. I’m not too familiar with concurrent mode in React, so I can’t really comment on that.
I wouldn’t worry about performance. As far as I know, the Closure compiler (which CLJS uses) is still the best compiler for optimising bundle size. I also wouldn’t worry about using shadow-cljs, it’s being actively maintained and funded by Clojurists Together.
With regards to wrapping JS libraries, you can use the libraries directly if they’re in cljsjs, as almost all popular JS libraries are. It’s very easy to do this, you can basically use the JS library like a CLJS library. However if a library you want to use isn’t in cljsjs, and you want to use advanced compilation, you’ll have to create externs files which can be quite difficult.
I hope that covers all your concerns, and gives you some food for thought 