I do like hyperscript better than JSX... precisely because it's not a syntax for function calls. Because it's just a function.
I do like hyperscript better than JSX... precisely because it's not a syntax for function calls. Because it's just a function.
There are good reasons to be skeptical about JSX simply because of the worry about how much business logic may accidentally be embedded directly into views. For JSX, the answer is typically to solve that in other areas of workflow and patterns of habit. But the war between "as dumb as possible a templating language" and "just let me use my real language for templates" will probably wage on in the web space forever.
As a loop: Store -> State -> Reducer -> Component -> Action -> Dispatch -> Store ...
Or if you want something closer to MVC, you could use MobX or similar.
I just also remember being an idealistic Django-loving youth that wanted the dumbest possible template engine to avoid teenage PHP drama, so I definitely sympathize with folks whose gut reaction is upset with JSX for crossing the streams (again), and thought to make sure it was clear that it isn't a straw man argument to many. (Even if it is also, as in my case, an argument that can be won in favor of JSX. Though also in my case one of the big factors winning that argument was TSX [Typescript type checking of JSX views] versus many of the alternatives and their [lack of] static checking/analysis.)
You should check out Elm: https://elm-lang.org/. It uses a hyperscript like syntax for rendering in a functional style. It's all just functions, and it reads that way too.
JSX is just a more natural syntax to those used to HTML/XML directly as an expressive syntax. Nobody is forcing anyone to use it... `const h = React.createElement;` if you prefer the functional syntax directly.