|
|
|
|
|
by cies
1476 days ago
|
|
To me JSX is the opposite of what Maud (Kotlinx.html, Elm's HTML lib, Haskell's type-of-html) does. In Maud you write "just code", and "as code". In traditional template engines you have a big string with holes, if-elses and loops. In JSX you write templates as if it is a traditional templating engine, but under the hood it gets translated to JS-code. Somehow JSX seems to be "worst of both worlds" to me. Some of these HTML-templates-as-code libs (like Kotlinx.html) are generated from a formal HTML specification. This is really nice, and makes it more type safe (only allow tag nesting that is allowed, and only allow attributes that are allowed; ofcourse with escape hatches). |
|