I ended up going with fulcro after looking a while at the different alternatives.
Some personal thoughts on the cljs front-end libraries:
Hoplon
Is something different not a react wrapper.
Rum
Seems interesting but very minimal wrapper. The thing that sets it a part is that it can do SSR on the JVM. Think only rum, om-next & fulcro have nice server side rendering on the JVM out of the box.
Reagent
Is a minimalist wrapper. Think it’s great for getting started and being productive but you do have a lot of blanks to fill. There is also a nice free course https://learnreagent.com/
Re-frame
Think it’s the most popular library. If you’re just getting started the docs are really nice, seems pretty close to redux/mobx, docs are awesome & plenty of libraries available.
Keechma
Reagent based framework close to re-frame. Has some interesting concepts centered around the router.
Om-next
Interesting conceptually. Would even go as far as calling it “ground breaking”. But mostly unmaintained, docs missing and nothing much happening there apart for bug-fixes. If you like the concepts there really is no reason to not go with fulcro.
Fulcro
This is the one I ended up using. Fulcro, previously named untangled started out as a om-next fork now it’s standalone.
It’s close to apollo-client in js, but a lot less restrictive (ex: you have full access to the app state like in redux)
There is a bit of a learning curve, but if you have the time would recommend learning it if nothing else just to learn from it since it has a really nice architecture (for me reading the fulcro docs was similar to learning clojure, plenty of “AHA, wow” moments when I realized how beautiful & consistent all the pieces fit together).
I really liked the answers in fulcro for problems I was having:
- How do you normalize you app state ? (ex: if you’re duplicating the article in 3 different views you can only go so far)
- How do you handle fetching only the data you need from the server ? (ex: adding a new server property on the component should propagate to all the views in witch the component is used)
- How do you do optimistic updates right ?
- How can I take advantage of a graphql backend like apollo-client does ? (not out of the box, you have to integrate with https://github.com/wilkerlucio/pathom , but works really nice)
To sum it up. If I had to start all over I would go with:
Reagent for moving fast on toy apps.
Re-frame or Keechma for moving fast on mid sized apps . Pretty sure they also scale ok but you still have some things that you have to implement yourself (normalization, fetching only the data that is needed etc…)
Fulcro if you have the time and are looking for something that after you learn will help you with a lot of the heavy lifting, moving a lot of the complexity away from your app code.