by lsdafjklsd · 8y ago · 0 comments
Things that are a deal breaker for me:
Template language... You can call it 'separation of concerns' all you want, but just let me generate templates using the language I already know, JSX is great
State management... I cut my teeth with Ember professionally for a few years, and really loved it up until I built a data intensive app. Having state spread across different controllers is great when you have many different routes and pages, but if one page turns in to a photoshop like app, controllers make a terrible state management tool. It doesn't seem overly complicated to me to use redux along with react-redux's connect function to connect regular functions returning JSX to your state object. Looking at Vue.js, it seems like I need to learn Ember-lite + Angular (custom directives).
> let me generate templates using the language I already know, JSX is great
https://vuejs.org/v2/guide/render-function.html#JSX
> controllers make a terrible state management tool.
I haven't used react-redux but vuex is essentially the same decoupling, and there's very little boilerplate. https://vuex.vuejs.org/en/intro.html
Not everyone knows JSX, so while that argument applies to you, it doesn't apply in general.
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.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.