gothinkster/vue-realworld-example-app

Vuex store modifcations

Open

#17 创建于 2018年1月25日

在 GitHub 查看
 (1 评论) (4 反应) (0 负责人)JavaScript (4,037 star) (1,288 fork)batch import
good first issuetype:enhancementtype:help wanted

描述

Hello,

if I am not mistaken, the store is not used in strict mode and if you would change it to strict, you would have a lot of errors like "don't vuex mutate state outside store". Because you are binding all properties of an object directly to v-model. In my opinion this is not good practice, because mutating outside of store can lead to unexpected behaviour in big applications and so debugging would be hell. I think this should be fixed. Either cloning the object before mutating or set for each properties the setter and getter methods, see: https://vuex.vuejs.org/en/forms.html

If you already know this, you should at least mention that inside documentation.

Cheers,

Marco

贡献者指南