3 ms·
The 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
by iamacucumber 9y ago
The 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...