My thoughts exactly. JSX provides the best templating syntax I have seen - it's just JS, and it uses curly braces to delineate JS. Putting JS, or worse, custom syntax in strings is terrible, and every other delineator choice is less idiomatic and uglier than curly braces.
I see your stance! There are two ways to this: JS-first (React) or HTML- first. Hyper takes the latter: purely focusing on the semantic HTML structure when assembling interfaces. Focusing on pure structure (like React 1.0) and delegating design and logic to concerns that master it the best.
My thoughts exactly. JSX provides the best templating syntax I have seen - it's just JS, and it uses curly braces to delineate JS. Putting JS, or worse, custom syntax in strings is terrible, and every other delineator choice is less idiomatic and uglier than curly braces.
JSX is good but still has room for improvement:
- Original HTML attribute names, `class` instead of `className`, `for` instead of `htmlFor`
- Let expressions and components return multiple elements without the need for `Fragment`.
Could make a JSX 2.0 which would be much closer to actual HTML.
attribute names depend on the implementation, Solid uses JSX and `class`
have you tried lit-html?
I see your stance! There are two ways to this: JS-first (React) or HTML- first. Hyper takes the latter: purely focusing on the semantic HTML structure when assembling interfaces. Focusing on pure structure (like React 1.0) and delegating design and logic to concerns that master it the best.
You should take a look at markojs, it's also html-first but the syntax is IMHO more elegant as it extends html (especially the alpha of 6.0 syntax)
Stringly typed templating language