I've used both Knockout and Vue for frontends that needed to render reasonably large amounts of disparate elements with near real-time updates, so I think I can answer this. Knockout is nice but feels closer to jQuery in that it requires a lot more discipline on the behalf of the developer to organise and maintain code. Things like ObservableArrays means dealing with another layer of abstraction; the wonderful thing with Vue is that it's just native JS objects all the way down. It also has a better structured child/parent component model with event flow, not to mention being much faster for rendering. I would also recommend Vue over Knockout.
Exactly my thought when I tried Vue.js: on the surface, it's knockout with some react-inspired additions that make it faster. I loved being able to pick up Vue.js and make something that just worked in 30 minutes.
Re:Why we chose Vue.js
by SparkyMcUnicorn on Friday October 21, 2016 @09:30AM
(#12760214)
https://vuejs.org/guide/comparison.html#Knockout
I've used Knockout before and it's really slow. I also find Vue to be less complex overall in comparison to Knockout.
React with MobX, Vue and Knockout all seem very similar. I am wondering if TypeScript is a first class citizen in either MobX or Vue - in my experience seeing TypeScript everywhere in Angular 2 has been one of that platform's biggest wins.
MobX is written in TypeScript: https://github.com/mobxjs/mobx
yep, Vue has an official support for TypeScript as well: https://github.com/vuejs/vue/tree/dev/types
Re:Why we chose Vue.js
by dabernathy89 on Friday October 21, 2016 @10:48AM
(#12760880)
When I first started looking at Vue last year this was my initial thought too. Overall, I think Vue has more to offer, has a cleaner syntax, and is more enjoyable. Some specific things I like:
- With Vue, you don't have to specify which pieces of your data are 'observable'. The entire data object for each component is reactive.
- Vue's getters/setters mean you can interact with your data really easily, no need to invoke properties as methods
- Directives are more readable. Knockout makes you cram everything into the `data-bind` attribute, whereas Vue splits these out into individual attributes( @click, :class, v-if, etc)
FYI, I'm thinking about dropping Knockout because some performance problems I'm having with a very specific use-case.