Echo JS 0.11.0

sylvainpv 224 days ago. link parent 4 points
Just because we don't like JSX does not make us "HTML oriented engineers", if such a job exists. This is something I often hear and it always sounds arrogant to me.

I find it very presumptuous to claim that JSX will survive the next trend in web dev. JSX came with React and already cause issues today when used with other trendy tools like TypeScript (hence TSX). It is also very close to standard-compliant alternatives such as hyperx using template strings. Considering that JSX is far from reaching consensus outside of React community, I doubt that this is a lasting solution.


ferahl 224 days ago. link 2 points
JSX is popular in many frameworks actually, admittedly often frameworks inspired by React and has a pretty wide support. I've used templates and never liked them, I much prefer JSX and the && or ternary operator are just standard JS that anyone already knows. That's actually why I like it - very close to HTML, easy to fragment into multiple functions, everything inside curly braces is just standard JS. But I understand not everyone agrees just saying..
planttheidea 223 days ago. link 1 point
I did not claim that JSX would survive the next big thing (I've been doing this too long to think anything will last more than a few years), you took my point out of context. Rather, the idea is that neither thing will stand the test of time, so imho it is a little safer to go with the thing that sticks closer to the native language. But trust me, only a little safer, it's mainly a comfort level thing.

And the HTML orientation is less about JSX as it is about how you approach building interfaces. Template languages make the DOM the focus, supersetting the features there and making it the focal point for triggers, updates, etc. Thinking DOM-first in engineering style leans itself to this approach. JSX makes the data itself the focus, and the DOM is a pure reflection of the data. Thinking data-first leans itself to this approach. Again ... A comfort level thing, no right or wrong, because both methods solve the problems we face.