logoalt Hacker News

hajiletoday at 4:36 AM2 repliesview on HN

JSX is <div>abc</div> turns into createElement('div', null, 'abc') and you can use that instead of JSX if you like or you can use something like hyperscript. Everything else like mapping or if statements is pure JS and works just like JS anywhere else in your app.

Vue templates mean learning Vue's custom syntax for if statements, loops, dynamic attribute syntax (with its own gotcha), binding dot modifiers, data binding, and whatever else. It requires learning its entire custom directive system. It uses custom syntax for stuff like events too.

I don't see this as remotely comparable with Vue being much closer to something like my time working with Angular 1 (a time I'd rather not repeat).


Replies

lwansbroughtoday at 4:51 AM

It’s a distinction without a difference. Both need to be transpiled, what happens under the hood is of little concern to anyone.

Please explain React’s reactive data binding since it’s apparently much simpler than v-model=

;)

show 1 reply
Semaphortoday at 4:51 AM

Vue supports JSX, though to be fair, it’s not idiomatic and hence never shows up in any docs.