v-if is actually a big reason I prefer Vue. Ternary operators in JSX are pretty ugly. The other is that Vuex just feels so perfectly integrated. I've never felt Redux blends in particularly cleanly, though I certainly don't judge people that do prefer it.
All of the following is neither Javascript nor HTML:
v-for=”x in list”
v-if=”conditional”
v-on:click=“function”
v-bind:key=“something.id”
etc. etc. etc.Especially for the else-if case - you end up with repetitive conditionals to replicate that.
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?
You can have as much separation of concern as you like with React.
^ this.
It directly translates to `React.createElement`. This is also why everything inside {} is pure Javascript including things like proper `this` etc.