4 ms·
>JSX is not required to use React Everyone keeps repeating this, but looking at a pile of 'createElement' calls is so much harder to read than just looking at
by test1235 6y ago
>JSX is not required to use React
Everyone keeps repeating this, but looking at a pile of 'createElement' calls is so much harder to read than just looking at a page of html.
- ng12 6y agoAnd so you introduce a simple build step to improve your development experience.
- Zarel 6y agoThere are a lot of libraries to it more readable: https://blog.bloomca.me/2019/02/23/alternatives-to-jsx.html https://blog.bloomca.me/2019/02/23/alternatives-to-jsx.html If you don't want to use any of them, convention is to use: const h = React.createElement; I don't know of anyone who actually uses `React.createElement` directly. Personally, with all the other things needing a transpile step (TypeScript, and support for older browsers), I've just gotten used to having one in every project nowadays.