4 ms·
HTM actually looks pretty intriguing to me. One thing I like about JSX is that it looks and feels like HTML. For me, that has two huge benefits: 1. It narrow
by SkyPuncher 8y ago
HTM actually looks pretty intriguing to me.
One thing I like about JSX is that it looks and feels like HTML.
For me, that has two huge benefits:
1. It narrows the dissonance between the code I'm writing and the actual structure that will be rendering into the DOM. I find it much easier to write and debug when I don't have translate between some JS factory function and the actual DOM implementation.
2. It's almost pure HTML. Sure I'll have to change class to className and update some other tags. Generally, though, if something works in HTML, it's little fuss to do in JSX. With tools like JSX, I can write in a single templating language across all of my software.
- wtfrmyinitials 8y agoOne thing the author missed about htm is that you don’t necessarily need to parse it at runtime— there’s a Babel plug-in to compile it to plain js function calls. This way you can develop without a transpiler and add one later when (if) the extra performance becomes necessary.