Re:I created the exact same app in React and Vue
by dmitriid on Monday July 30, 2018 @12:48AM
(#17642134)
JSX is not markup
Re:I created the exact same app in React and Vue
by bmarkovic on Monday July 30, 2018 @05:42PM
(#17648338)
JSX is PHP-mix-HTML templates and JSP all over again. Those that fail to learn from history are doomed to relive it.
Re:I created the exact same app in React and Vue
by dmitriid on Tuesday July 31, 2018 @12:56AM
(#17650637)
It's not. It's nothing but a `React.createElement` function call. It's a paper-thin XML-like DSL over real unadulterated JavaScript code.
HTML-in-PHP wasn't PHP. HTML-in-JSPwasn't Java. JSX in JavaScript is JavaScript. And that is a whole world of difference.
I think a much nicer way to work with templates is to see your markup with the same structure it will have once rendered, and attributes that describe those elements (just like real HTML attributes).
When it comes to accessibility, and creating predictable interactions without elements snapping around, I find it easier to visualize the end result when the markup isn't littered with text that won't be rendered.