Why does React use JSX when it could be all JavaScript and JSON?
My guess is that XML is good for situations where text and data is mixed.
My guess is that XML is good for situations where text and data is mixed.
Meanwhile the only issue I have with JSON is the lack of support for trailing commas.
I don't agree. My take is that HTML/XML-like syntaxes benefit from familiarity from front-end developers, and a DSL to express document/component trees ends up simplifying the job of expressing document/component trees.