Hacker News new | past | comments | ask | show | jobs | submit login

You don't, because JSX is not required for react. This isn't even just a theoretical point, but something I've actually done in the past several times; it's very convenient to just try something out by throwing react into a script tag and then just writing a small prototype or something without utilizing JSX and thus avoiding the need to set up a build system and everything else. I would still use JSX for larger projects, of course, but it is mostly just a small quality-of-life improvement, and I'd be using react even if JSX didn't exist, as the actually important parts of the library are not about JSX.



I know you didn’t explicitly say the opposite, but I want to point out that everything you said about React also works with Vue.

You can use .vue files, use JSX or write the h-function invocations by hand. Except for SFC-support, this also works without a build step: https://vuejs.org/guide/quick-start.html#using-vue-from-cdn


SFC is not required for Vue either.


> You don't, because JSX is not required for react.

And what does this have to do with the fact that the absolute vast majority of react code is written with JSX and that you need special tools in IDEs to deal with React code (because regular JS tools would break)?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: