3 ms·
Likewise, I feel the same way about template DSLs (why add yet another language's control flow/scoping/etc. into the mix?). I think if JSX had been around first
by exogen 8y ago
Likewise, I feel the same way about template DSLs (why add yet another language's control flow/scoping/etc. into the mix?). I think if JSX had been around first, many more developers would find templates off-putting, seeing as they amount to writing code that builds up other code as a string.
It's just that they're the way things were done for so long...
I wonder what a newer dev's take would be? Would they find UI elements as values/expressions weird, or UI elements as strings weird?
- froglegs 8y agoI can see that argument... the same could be said about learning jsx as a layer on top of native js.. Before spa’s it was just interpolated strings rendered on the server.. people probably thought the same thing when rendering a string of html inside their python/ruby/java program. My take is if it gets the done and the team agrees, use whatever tool works! In ember-land, single file components are in the pipeline I believe, will be interesting to see if they end up supporting jsx too.
- mnutt 8y agoEmber’s HTMLBars is no more “building up code as a string” than jsx is.