Hacker News new | ask | show | jobs
by Aeolun 3104 days ago
> and is embedded in normal javascript

Exactly! I don't know, but I've always found that disgusting. It turned me off React when I first saw it, and it still does.

Then people use it to defend react, and I'm just like 'Lolwut? Did we spend years learning that SOC is a good thing only to throw it out of the window?'

I'll be the first to admit that any Vue template quickly becomes soup as well, but at least it's only half of the soup.

Is it just younger developers that think React is the best thing since sliced bread?

1 comments

JSX is a thin XML-like DSL on top of Javascript.[1] Unlike untyped strings with a custom parser of Vue, which require you to write something that’s neither HTML nor Javascript.

You can have as much separation of concern as you like with React.

[1] https://reactjs.org/docs/jsx-in-depth.html

JSX is also neither HTML nor JavaScript.
> JSX is a thin XML-like DSL on top of Javascript

^ this.

It directly translates to `React.createElement`. This is also why everything inside {} is pure Javascript including things like proper `this` etc.

Ok, so they both let you use something more like what you already know, except neither of them are technically JavaScript or HTML. Glad we established that. I think the understated bikeshed color here is that VueJS allows you to use jade/pug syntax instead of HTML.