r/javascript • u/TargetNeutralized • May 19 '18
help Some meandering thoughts about Vue.js vs. React.js
I’ve been a software engineering consultant for the past 12 or so years and, after a three-year stint performing mostly full-stack work involving some combination of Node.js, Ruby on Rails, and Ember.js, just recently began working for a client looking to develop their website’s UI in Vue.js. I began learning Vue.js from scratch, but, maybe a month into the project, the client switched to React w/Redux due to internal politics. Switching from Vue.js to React.js/Redux was . . . awkward. I can’t quite put my finger on it, and I’m probably going to get flamed for this, but . . . man, I don’t really like React. Honestly, compared to Vue, it just feels hacky and convoluted, whereas Vue feels more well-structured/better organized. I might go so far as to say that it’s a joy to develop in Vue. (I’m sure that some would have similarly kind things to say about working with React.)
I’ve heard some people say that React’s/Redux’s unopinionated nature allows for a higher measure of developer customization, etc., but, working on a team of engineers far more experienced with React (and Vue) than myself, the open-ended questions of React have led to no lack of disagreement among those engineers as to which package to use to handle interactions among actions, reducers, and the store. I noticed that we never had these conflicts/problems with Vue.js and were, on the whole, more productive, because we weren’t trying to solve rudimentary problems; Vue.js just prescribed the solution, and everything was fine.
Here’s the gotcha, though: in terms of consulting opportunities, React is far and away the more popular of the two frameworks in my major metropolis. So, while I think Vue is the superior framework, React has market share. There is considerable financial incentive to learn what feels like the worse of two similar solutions. I have a personal project that I’d like to develop using a modern front-end framework, and I’d like to use Vue.js. But, if I want to have demonstrably sharp chops at React and NOT spend all my time trying to become expert at both, I feel like I have to choose React
For all that, I’m wondering whether anyone else has undergone the same experience and has any advice as to how I might streamline/improve my React/Redux development experience, because, right now, I can’t help comparing it to Vue on a daily basis.
View all comments
Show parent comment
6
u/perpetuallyperpetual May 19 '18
I'd like to add to the other answers that a lot of the tools you see in the React/Redux paradigm are optional and are just there to provide extras (when needed only).
React, for example, can work without Webpack, Babel or NPM. Those are often used since they provide a lot of nice features, but working on projects without using them is a viable option. I think a lot more tutorials should teach React this way since you get a more fundamental understanding of what you're actually doing.
Redux is often criticized for "lots of boilerplate" which I personally find unreasonable. You only really need to know how to use reducers, which are simple plugin-like functions, and already you'll gain a lot in terms of state management. This 6 min tutorial shows how Redux can be used on its own (without React) and how it goes about managing state.
The React/Redux ecosystem is filled with smaller packages that you can understand well and use independently. Obviously, when integrating packages, you'll encounter some extra code to make them work together. On the flip side, you can use as much or as little of them you want (React, for example, started as a plugin to multi-page applications).