4 ms·
I keep hearing good things about Vue. Do you know how it compares to Angular 2? More framework than library? State management built in?
by jamra 9y ago
I keep hearing good things about Vue. Do you know how it compares to Angular 2? More framework than library? State management built in?
- caseymarquis 9y agoMost interesting pieces of vue are separate plugins. Ie vue-router for routing. I believe there's a state manager, but I haven't reached a level of complexity where I've needed to use it (I've got maybe 40 .vue components in an app which acts as a hub for IIoT units) Vue is just the V in angular's MVC, so there's definitely less to it. Using it with es6, webpack, .vue files, and vue-router has been a great experience. That said, the other half of my job involves .net/c/assembly/tcp, so I always worry I'm a step behind on web dev because I'm not devoted to it full time.
- iamacucumber 9y agoThe Vue guide has a comparison just for you. (might or might not be too biased, I don't know ng2) [0] Vue deals only with the view layer. So I would't directly compare it to Angular. But the authors do give you Vuex, for Redux-style state management, and Vue-Router which does exactly that. Alternatively: - use a second Vue instance as an event bus. Bonus points as the Vue devtools list all the events fired. Makes it easy to debug. - due to it's reactive nature, Vue let's you implement a single source of truth quite easily. [1] - Using dynamic components, you might not even need a router [2] Personally, I've tried to use the single source of truth pattern but quickly resorted to Vuex. It just resonates with me. [0] https://vuejs.org/v2/guide/comparison.html#Angular-Formerly-known-as-Angular-2 https://vuejs.org/v2/guide/comparison.html#Angular-Formerly-... [1] https://vuejs.org/v2/guide/state-management.html#Simple-State-Management-from-Scratch https://vuejs.org/v2/guide/state-management.html#Simple-Stat... [2] https://vuejs.org/v2/guide/components.html#Dynamic-Components https://vuejs.org/v2/guide/components.html#Dynamic-Component...