Remix.run Logo
hajile 5 hours ago

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).

lwansbrough 4 hours ago | parent | next [-]

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=

;)

incrudible 3 hours ago | parent [-]

It is a massive difference. I do not like magic compilers. The JSX transform is trivial and not even necessary, just create a factory function and React.createElement becomes arguably more readable, just not HTML like.

lwansbrough 20 minutes ago | parent [-]

Is it a massive difference, or is it a small difference? At the end of the day 99% of React projects have a transpilation step and utilize some form of “magic compiler” somewhere along the line.

The simplicity of JSX is overvalued. It just means more code, and typically uglier code, to achieve the same behaviour as Vue. Which is basically the theme of React when you compare the two libraries.

Semaphor 4 hours ago | parent | prev [-]

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