3 ms·
You are assuming a lot. I know how to write purely functional template code using the virtual DOM in JavaScript, or something like SXML in Scheme. You can do
by davexunit 11y ago
You are assuming a lot. I know how to write purely functional template code using the virtual DOM in JavaScript, or something like SXML in Scheme. You can do this without using a terrible mashup of XML and JavaScript.
> JSX is far more pleasant to read and write than the native function call syntax
No, it isn't. XML is both hard to read and write. It's for machines, not humans. Besides that, mixing two languages with two very different syntactic structures together is a recipe for disaster. And besides that, you now need an additional compilation step because it's not plain JavaScript. What works much better is something like Mithril's templating API, which is concise and pure JavaScript.
- natrius 11y agoOkay. Most people prefer reading and writing JSX, and haven't found it to be "insane" or a "disaster." I'm glad you found a library you prefer!