3 ms·
While most of the comments here seem positive… A custom template language is like another programming language to learn (to make mistakes in). I prefer JSX/TSX
by qprofyeh 4y ago
While most of the comments here seem positive… A custom template language is like another programming language to learn (to make mistakes in). I prefer JSX/TSX which is closer to reusing HTML.
- dcre 4y agoSpeaking as nearly-exclusively a JSX/TSX user, it is not really true that it is closer to HTML than Svelte's templating. People who like and use Svelte report the opposite.
- ovao 4y agoAgree with this. Iterating with Array.map and returning nodes to compose, say, unordered lists in JSX is most decidedly un-HTML-like. I can see the drawback to learning yet another templating language, and on this point I’d just say “to each their own”. I feel like either approach is fine. Svelte’s templating is pretty minimal, so there isn’t much to learn.
- kalkr 4y agoIMO Svelte feels much more like HTML than JSX does.
- qudat 4y agoI don’t get why you’d want to try to emulate html. The syntax and closing tags are brutal on the eyes. I’d prefer a more lisp style syntax for representing html
- dawei67 4y agothe template "language" is learnable in 10mn and fit in a small cheat sheet. I personally think JSX as a template language make HTML horrifying to read