Correct me if I'm wrong, but I think the difference here is that JSX is always converted to vanilla JavaScript before it ever reaches the browser or a compiler (see: reactjs.org/docs/jsx-in-depth.html). Whereas markup like HTML can be read as-is. I don't know what happens to handlebars before it reaches the browser, but the infamous Flash Of Unstyled Content issue leads me to think that it's special syntax that handlebars parses and replaces, not syntactic sugar for something else.
Thanks for the added info re: converted to vanilla JS before reaching browser. I hadn't thought of that at all. The vibe I was agreeing with is that OP feels "syntactic sugar" may be a poor metaphor for something syntactically hybrid (aka writing JS in your HTML).
Markup is parsed as dom tree first I thought, then style sheets + JS are read, but in the case of react, the taskrunner decides what is compiled and rendered first...?
lol at "flash of unstyled content". I only just thought about what kind of mechanism that could be.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Correct me if I'm wrong, but I think the difference here is that JSX is always converted to vanilla JavaScript before it ever reaches the browser or a compiler (see: reactjs.org/docs/jsx-in-depth.html). Whereas markup like HTML can be read as-is. I don't know what happens to handlebars before it reaches the browser, but the infamous Flash Of Unstyled Content issue leads me to think that it's special syntax that handlebars parses and replaces, not syntactic sugar for something else.
I read this about 3 times: jasonformat.com/wtf-is-jsx/
Thanks for the added info re: converted to vanilla JS before reaching browser. I hadn't thought of that at all. The vibe I was agreeing with is that OP feels "syntactic sugar" may be a poor metaphor for something syntactically hybrid (aka writing JS in your HTML).
Markup is parsed as dom tree first I thought, then style sheets + JS are read, but in the case of react, the taskrunner decides what is compiled and rendered first...?
lol at "flash of unstyled content". I only just thought about what kind of mechanism that could be.