23 ms·
Inline JSX is such a stupid idea, and react.js doubles down on stupid. Why do this? The documentation never explains why it is good to add some invalid JavaScri
by bellerocky 12y ago
Inline JSX is such a stupid idea, and react.js doubles down on stupid. Why do this? The documentation never explains why it is good to add some invalid JavaScript syntax to a library. I want my templates in the same file as my JavaScript logic, inline no less, peppered throughout variable declarations and function calls all over the place, like I want to stub my toe. I do not want to stub my toe and I don't want to use JSX. Notice the complete lack of support in Webstorm.
- fiatjaf 12y agoI agree. It is ugly. It must be because of HTML reuse or something. But you should try writing React templates in pure Coffeescript[1], perhaps reusing your HTML through a tiny tool[2] I wrote for it. [1]: http://blog.vjeux.com/2013/javascript/react-coffeescript.html http://blog.vjeux.com/2013/javascript/react-coffeescript.htm... [2]: http://html2react.alhur.es/ http://html2react.alhur.es/
- bellerocky 12y agoI should mention that I have changed my mind about JSX after actually giving it a try.