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

Computed properties inside stores #36

Closed
thelinuxlich opened this issue Jan 11, 2016 · 6 comments
Closed

Computed properties inside stores #36

thelinuxlich opened this issue Jan 11, 2016 · 6 comments

Comments

@thelinuxlich
Copy link

This would be useful for i18n. I wouldn't need to pass down a computed property consuming the store to every component.

@yyx990803
Copy link
Member

See http://vuex.vuejs.org/en/structure.html#extracting-shared-computed-getters

@thelinuxlich
Copy link
Author

I still need to initialize it as computed and pass along any interested components

@yyx990803
Copy link
Member

That's just how it would have to work - the store should only hold plain state. These standalone-computed getters are easy to compose though.

@thelinuxlich
Copy link
Author

understood

@uptownhr
Copy link

uptownhr commented Jan 4, 2017

@yyx990803 appears the link is no longer pointing to the shared computed getters example. Is there a new one?

@yyx990803
Copy link
Member

@uptownhr this no longer applies in latest version of Vuex. See http://vuex.vuejs.org/en/getters.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants