3 ms·
I wouldn't call JSX an XML dialect. It's JS with the ability to use HTML tags (or things similar to HTML tags, given the class → className rename) as rvalues. T
by Kwpolska 3y ago
I wouldn't call JSX an XML dialect. It's JS with the ability to use HTML tags (or things similar to HTML tags, given the class → className rename) as rvalues. The JSX HTML tags aren't valid XML, e.g. because of braces (<a href={url}>). Even if you don't use any attributes, an XML parser won't do anything useful to a JSX document.
- noduerme 3y agoI'd never heard it described as using HTML tags as rvalues but that just makes it sound so much worse.