top | item 43937988

(no title)

kakuri | 9 months ago

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.

discuss

order

silverwind|9 months ago

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.

chris_pie|9 months ago

attribute names depend on the implementation, Solid uses JSX and `class`

owebmaster|9 months ago

have you tried lit-html?