Has anyone else made the switch from JSX to hyperscript? JSX works well enough, but I love the consistency and composability of building views with plain old functions and data structures.
I switched the other way, as JSX fixed the main problem I've had for years using "hyperscript" (or DOM builders, as we used to say). Its comma-free syntax sugar for function calls, element lists and attribute objects makes it so much easier to write and maintain.
"Overall it's not a bad experience. JSX makes HTML feel more at home, but tends to obscure the underlying Javascript. Composition and higher-order components are more obvious in plain JS. If I was writing a library using those patterns heavily I might be tempted to go JSX-free even if bundling with Webpack + Babel."
There are a number of template languages that compile to hyperscript, I use jade/pug [0]. I haven't had to change my templates in years but I can still take advantage of virtual DOMs like React.
Before hyperscript, there was Templatizer which also compiled templates to JS functions. There are numerous good reasons to be able to manipulate templates easily as functions. Nevertheless there are numerous good reasons for templates (e.g. my designers don't need to know JavaScript, template languages last longer than JS trends, etc.).
JSX is just 'plain old functions' - just with some syntactic sugar on top to make it a bit easier to write. In fact, JSX compiles down to functions looking very similar to hyperscript...