4 ms·
I have (some) experience with both React and Vue 2 and definitely prefer the later. Vue is very minimalistic but unlike React provides a lot of functionality ou
by Blixs 9y ago
I have (some) experience with both React and Vue 2 and definitely prefer the later. Vue is very minimalistic but unlike React provides a lot of functionality out of the box. Stuff like the router, the computed properties, automatic change detection, HTML templates, scoped css, animations, ... . But what's more important is the fact it does all these things in an extremely elegant and unobtrusive way. The computed properties are an often overlooked but good example of this. You simply declare an object property that is dependent upon other properties and voila, that's it. It's there in your component together with the rest of your data for you to use in your template. It gets memoized, it gets change detection, it just works (TM). No need for Redux, Reselect, selector functions or any of those things. I love the simplicity of this approach. And this is just an example, but this very minimalistic approach applies to everything that Vue offers.
- danmaz74 9y ago> unlike React provides a lot of functionality out of the box. Stuff like the router, the computed properties, automatic change detection, I never studied Vue, but the article starts saying "Both have separate, but commonly used, router and state management libraries". This doesn't look like "out of the box" to me.
- mcintyre1994 9y agohttps://vuejs.org/v2/guide/routing.html https://vuejs.org/v2/guide/routing.html For most Single Page Applications, it’s recommended to use the officially-supported vue-router library. For more details, see vue-router’s documentation. https://github.com/vuejs/vue-router https://github.com/vuejs/vue-router -- https://vuejs.org/v2/guide/state-management.html https://vuejs.org/v2/guide/state-management.html Vue offers vuex: our own Elm-inspired state management library. https://github.com/vuejs/vuex https://github.com/vuejs/vuex -- Out of the box or not, they're part of the same github org, they're officially supported and they're documented in the official docs. I think this is just splitting hairs.
- danmaz74 9y agoRedux has been from the same github org for a very long time too: https://github.com/reactjs/redux https://github.com/reactjs/redux And react-router, while not being on the same github, is pretty much considered a standard too. It's ok to not split hairs for vue.js, but then you shouldn't do the same for react...
- wereHamster 9y agoreact-router, do you mean v1, v2, v3, or v4 (or perhaps v5 and v6, I haven't checked if there was a new release with breaking API changes during the past 12 hours).
- sheeshkebab 9y agoWhy downvote? Anyone sane can't seriously be thingking of using react-router in anything non throw away - the library gets rewritten from scratch every year and doesn't provide any backwards compatibility or migration paths. You might as well just write your own react-router implementation for every react project you work on.
- forgottenacc57 9y agoAgreed. I need to switch from react-router. I think they are now making major changes for no good reason.
- buchanaf 9y agoI mean react-router is almost a 3 year old library trying to handle a rather complex problem. The first three versions were largely the same with no major changes that I can think of except for switching from context to higher order functions. I think everyone is a little dramatic about the number of versions of the library, especially when they are going to continue to support v3.
- ricardobeat 9y ago
- kevin_thibedeau 9y agoVue is being specifically designed to work as small composable modules. That is a good thing. You get a bunch of boxes you can mix and match as you wish.
- pier25 9y agoIn separate repos, yes, but unlike React both the Router and Store are official. When using Vue CLI it configures a project for you with vue-router and vuex.
- bertjk 9y agoComing from a small-team Rails background, I tried React for a few months, then tried Vue. I found with React I felt compelled to replace and relearn large parts of my stack, and the learning curve as a result was very steep. In comparison adding Vue components to an existing Rails app was dead simple, and I even got to keep writing my Vue templates in HAML. All the questions I had were easily answered by the Vue documentation without even going to e.g. stackoverflow. Vue was the clear winner for me here.
- bertjk 9y agoComing from a small-team Rails background, I tried React for a few months, then tried Vue. I found with React I felt compelled to replace and relearn large parts of my stack, and the learning curve as a result was very steep. In comparison adding Vue components to an existing Rails app was dead simple, and I even got to keep writing my Vue templates in HAML. All the questions I had were easily answered by the Vue documentation without even going to e.g. stackoverflow. Vue was the clear winner for me here.