4 ms·
JSX isn't JavaScript. It's JSX.
by m1sta_ 8y ago
JSX isn't JavaScript. It's JSX.
- phpnode 8y agoWhy is it not JavaScript? The Ecmascript spec explicitly allows syntax extensions.
- emn13 8y agoI'm not javascript syntax, especially if you're being pedantic, but focusing on that is kind of missing the point, which is that it's tool friendly in the way string interpolation is not.
- shawn 8y agoIntellij automatically highlights HTML syntax inside grave quotes, so this argument doesn't seem to apply here. Emacs likely has a similar feature. I don't know about Atom or Sublime, but HTML entity interpolation within grave quotes is an extremely common tooling feature.
- orange8 8y agoIs this valid Javascript: %%$$#~~~~## What if I make it my special js "syntax extension"?
- rickycook 8y agono, but it BECOMES javascript after transpile time
- m1sta_ 8y agoYep. Just like C code isn't binary code.