4 ms·
This is probably true, but it's a really poor rationale for choosing a templating* solution. Sure, JSX is slightly easier to pick up than a pure templating solu
by vec 9y ago
This is probably true, but it's a really poor rationale for choosing a templating* solution. Sure, JSX is slightly easier to pick up than a pure templating solution would be, but that doesn't mean learning modern templating tools is hard. Making already easy things easier isn't much of a win in my book.
On the other hand, JSX is extremely difficult to read. I can glance at a relatively complex handlebars template I wrote two years ago and instantly understand what it renders. To do the same with a similar JSX component requires spending ten minutes to trace the control flow, understand all the helpers, and mentally re-inline all the loops and conditionals. It's conceptually simple, which is attractive, but in practice that seems to lead to noisy, nonlinear render functions that have little to no structural similarity to their final rendered DOM.
It's also worth noting that JSX is easy to pick up for javascript developers. It's next to impossible for the kind of design-focused frontend people who know HTML and CSS inside and out but only ever needed enough JS to write the occasional jQuery selector. If you're certain your project will never have any styling input from people who aren't first and foremost programmers then JSX might be a great fit, but the rest of us actually have to work with our teams.
* Yes, I know, JSX is technically not a template.
- always_good 9y ago> It's also worth noting that JSX is easy to pick up for javascript developers. It's next to impossible for the kind of design-focused frontend people who know HTML and CSS This seems more like a meme than reality. Design is hard. Someone that was able to credentialize in CSS of all things can learn some JS/JSX. Give them some professional courtesy and credit. Saying that it's "next to impossible" seems kinda toot-my-own-horn dismissive.