Hacker News new | ask | show | jobs
by dgb23 1475 days ago
I think the big differences don’t come out visually.

In JSX you might be struggling with expressing certain things, because JS has a statement expression syntax. So you have to circumvent that. In Clojure everything is an expression already.

In JSX you can manipulate components with HoCs. In Clojure it’s just data, no special ceremony needed.

On the client, if you’re using React, you might use hooks to keep travk of state, which are a special construct that don’t exist in JS. In Clojure, if you use something like reagent, you just use atoms, they have a special purpose implementation, but they look and feel like regular old atoms.

However I have to say, JSX and React are very productive even with those limitations, simply because the tooling around it is so good.

1 comments

Hopefully the limitations around expressions in JS will go away at some point and JS will become properly expression orientated. There are already proposals for this, although they currently seem to be stalled.