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的问题 #447
Comments
公共的数据可以放进去。没必要的数据会导致内存占用过大 |
组件里的data作用域一般是组件,单页面应用中还有些数据需要在组件间共享,这时候比较适合用store,store里的数据也是响应式的 |
1 similar comment
组件里的data作用域一般是组件,单页面应用中还有些数据需要在组件间共享,这时候比较适合用store,store里的数据也是响应式的 |
store不应该是用来做数据共享的,而是管理数据流动的,view层只需要触发action,业务逻辑都应该写在store里面,是不是应该这么理解? |
是的, |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
你好,请教下状态不是都应该放在store里面吗,为什么组件都有自己的data,这样不是不好维护?谢谢
The text was updated successfully, but these errors were encountered: