Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

"you have the learn new syntax" is a really weird argument. Every approach, be it Vue, Svelte or React introduces a new alien syntax. In my personal opinion React approach is the most alien.

React's "it's just Javascript" mantra is a manipulation that only gullible folks will fall for: you can't just add a bunch of stuff to Javascript and then claim "it's just Javascript". If I throw a piece of steak in your coffee, you won't consider it "just coffee" anymore. And certainly you can't claim you're still a vegetarian after consuming that "cup of coffee".

I personally find it much harder to reason about the weird

  condition && <element>
  
syntax, compared to perfectly reasonable

  {#if condition}
    <element>
  {/if}
The latter so readable that it can even be understood by a non-engineer. The "new syntax" is as close to natural language as it gets.

Understanding the final layout is much harder in React.

That said, custom template syntax has indentation issue (you typically want indent both HTML elements and custom template tags, so anything inside conditions/loops has double indentation), so I actually think Vue template syntax (<element v-if="condition">) offers the best tradeoffs.

But regardless, at least when I'm looking at all 3 options, I see their tradeoffs and making an informed choice. React folks typically fail to even understand that there are tradeoffs. Even if you buy the "it's just Javascript" mantra, Javascript was never a good option represent a document layout.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: