Hacker News new | ask | show | jobs
by AlwaysBCoding 4255 days ago
I agree 100% with this post. Reagent is the best UI library that I've ever worked with. It's powerful, just works, and it's easy to understand what's going on under the hood.

I was able to teach a data scientist on our team how to build UI components in Reagent in less than 24 hours to the point that he was able to build his own visualizations for his data analysis with minimal guidance, that's how intuitive it is.

Compare that with Om which I've tried for about a month to grok and still can't get a handle on it. The only advantage that Om gives you over Reagent that I can see is global undo out of the box, but it's at the cost of significant added complexity. And if that's what you were really after you could just build one global state atom in Reagent to give you global undo without all the added complexity of Om. What am I missing here?

I think Reagent's model is the perfect blend of ClojureScript + React. The only shortcomings are that it's not actively maintained and I wish there was a more robust library of helper methods baked in, but those are easy tradeoffs to make for something so simple and powerful.

2 comments

I wouldn't go so far as to say that Reagent's model is perfect. Definitely pretty good, but we've had some issues that were somewhat non-obvious.

If you're worried about it being maintained, there was actually a great discussion of this post on the clojure subreddit (https://www.reddit.com/r/Clojure/comments/2jq0cu/om_no_troub...) where others talk about Reagent having a community-maintained fork with new features.

Out of curiousity though, what kind of helper methods would you be looking for? I found it pretty comprehensive on its own (though I do have some utility methods for some niche uses involving hierarchical atoms).

Personally I'm a believer in Om, but am skeptical of the "global state is only for undoable actions" model it espouses. Personally, I think the application state should hold ALL state of an application... I think "undo" should be implemented using a separate mechanism.

The primary selling point (for me at least) is that the cursor mechanics greatly simplify inter-component communication for react components. If you're not seeing those benefits, then the architecture of your app must differ greatly from my own- From this limited information, I can't really explain the difference in impressions in any more detail.