Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vuex中直接修改state 与 commit来修改state的区别 #86

Open
LuckyWinty opened this issue Jun 26, 2021 · 0 comments
Open

vuex中直接修改state 与 commit来修改state的区别 #86

LuckyWinty opened this issue Jun 26, 2021 · 0 comments
Labels

Comments

@LuckyWinty
Copy link
Owner

开发模式的时候,我们在使用vuex的时候最好设置成严格模式,修改state的时候我们不要直接修改,而是通过commit来提交。主要是为了状态能够很好的跟踪,开发者工具更好的处理状态变化,更好的调试体验。

更多解释:https://mp.weixin.qq.com/s?__biz=MzI0MzIyMDM5Ng==&mid=2649836165&idx=2&sn=fda5c16e11a53ebe2fb7e0d8a2c12b36&chksm=f1758046c6020950e1bba47ae87716a0a9b2cd3cf59fa38ea1878dc314c8d75064bad9cdb40b&token=1563169457&lang=zh_CN#rd

@LuckyWinty LuckyWinty added the vue label Jun 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant