News for hackers. Stuff that matters.
Re:React vs. Ember – EmberNYC slides by lobster_johnson on Tuesday September 02, 2014 @03:58PM (#8259762)
It's not even XML — it's JavaScript. The problems with for/class/etc. problems aren't because of XML, but exist because the preprocessor just translates everything to React.DOM element declarations, and of course "class" et al are reserved words in JS.

I agree that's it super awkward. I have no idea why they don't let the preprocessor be HTML-aware and translates class into className directly. I can't see how something like "class" would clash with the surrounding JS syntax given that it's specific to the local tag syntax. <Foo> isn't valid JS, after all, so why should "class" not be valid JSX?

It creates a maintenance problem, too, because React has to play catch up with every HTML tag and attribute and every CSS property.

There are no comments on this comment yet.