by jakecodes · 10y ago · 0 comments
My main feeling with Vue vs. React (maybe this should be a different post, as this post was meant to explain why Vue, and focus on the positives):
1. Vue is minimal to add in with existing code. React, is also not bad, but Vue is much simpler to mix in when you can't do a complete refactor.
2. React has a higher learning curve for large scale. I did not want a DSL. That's more stuff to learn and more things to debug.
3. GitLab's modus operandi has always been to keep things as simple as possible, Vue fits that. React does not.
4. React isn't just React it's many other things that you probably want to include.
I've written very large Vue, Angular and React projects in the past. I never had to think twice about which was the easiest to write a large scale project with. Vue scales well. It's never confusing. That doesn't mean that React is bad, or Angular is bad, it just means that the next time I have a choice I'll just choose Vue.
2. i think this depends on your background. if you've had the pleasures and displeasures of working through all the trials and errors of jQuery, then Backbone, then Ember, then Angular... React is painfully obvious to work with. because the problems it solves, the ways it solves them, and reasons for doing so are clear. if you're a new JS developer, maybe Vue probably has an easier learning curve. i'm also not sure why we are calling it a DSL when it's entirely plain JS. Vue templating- now that's a DSL.
3. valiant modus, but keep it contextual. simple can bite you in the ass. people don't introduce complexity for no reason (unless they don't know what they're doing, of course).
4. no... React is in fact just React. you can build a working UI without any supplemental React libraries. how is it "many other things" any more than Vue is?
I don't know if this is what @jakecode's argument is, but the tooling surrounding react builds is pretty bonkers. I can't keep up with the flavor of the week tools, and every single time I say this to someone, they tell me that the holy grail of React build tools is finally out and I just need to check it out. Except that holy grail is different every time the conversation comes up.
I'm not willing to put the build process of my entire app on a tool that's likely going to lose support and maintenance in the near future. It's just too risky and it's a big upfront investment to learn something that's going to be outdated quickly. I don't have the time to integrate something new constantly.
Vue, babel, webpack, vuex (or redux and vue-redux).
There's hardly a significant difference in requirements.
if we are making an apples to apples comparison, React does not need any external tooling to stand up to Vue.
I get it that implementing a big build process in an existing project can be crazy and not worth the effort, especially since GitLab's frontend lives inside of its rails app.
I wouldn't be concerned about DSL issues with React though, the API is 90% vanilla JavaScript.
I also didn't want to implicate that the Vue.js / React stuff was the reason I didn't get the job at GitLab! The interview process was great and very open.