|
|
|
|
|
by couchand
3073 days ago
|
|
The real problem with JSX is that it's almost HTML, but not quite, so you constantly have to fight against your assumptions about how it should work. At least JS is really just JS, and developers have been reading, mentally modeling and reasoning about JS -> execution translation for decades. |
|
It lets you write HTML templates as JS template literals:
But unlike using innerHTML, it stamps DOM from <template> elements, and only updates parts that change, actually doing less work than VDOMs.Lots of editors have automatic support for inline HTML tagged with a tag named "html", so you'll get syntax highlighting in say, Atom. And VS Code has a plugin that adds intellisense.