Hacker News new | ask | show | jobs
by oatmealsnap 2881 days ago
I'm the opposite. I hate seeing code syntax mixed with markup syntax. You can end up with hard to parse views (reminds me of PHP and Rails), and abstracts the final HTML structure from the developer.

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.

1 comments

JSX is not markup
JSX is PHP-mix-HTML templates and JSP all over again. Those that fail to learn from history are doomed to relive it.
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.