Open jemminger opened 7 years ago
I believe you'll get better idea of potential benefits by comparing example listed in readme with traditional vuex approach: https://github.com/vuejs/vuex/blob/v2.2.1/examples/shopping-cart/store/modules/products.js
Apart from obvious syntactical differences, you get following:
#state
and #commit
become available through this
(enables you to write more elegant code) :bowtie: In essence it is really a mixture of practical and ergonomic additions layered on top of standard vuex modules.
At time of writing vuex did not have automatic namespacing mechanism. Meanwhile it got addressed so now it is all about code elegance. 💅 💄
I'm still new to Vuex, so I'm not exactly sure how this benefits me. Any chance you can add to the readme a "before" example so I can understand it better?