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

Docs: Clarify getter cache behavior #831

Merged
merged 1 commit into from
Jun 11, 2017
Merged

Docs: Clarify getter cache behavior #831

merged 1 commit into from
Jun 11, 2017

Conversation

aduth
Copy link
Contributor

@aduth aduth commented Jun 10, 2017

In reviewing getters docs, it was not clear whether the results of a getter were cached. This is alluded to in the remark "think of them as computed properties for stores", and in reviewing the source it's seen that they are in-fact computed properties under the hood, but I think the docs could benefit from describing this behavior more explicitly. In fact, this alone is a compelling feature of Vuex, as unlike Redux which requires a library like Reselect (or my own Rememo), Vuex has caching built-in to its selector equivalents.

@aduth aduth changed the title Clarify getter cache behavior Docs: Clarify getter cache behavior Jun 10, 2017
@ktsn ktsn merged commit 41a5cbd into vuejs:dev Jun 11, 2017
@ktsn
Copy link
Member

ktsn commented Jun 11, 2017

Nice!

@aduth aduth deleted the patch-1 branch June 12, 2017 12:36
kazupon added a commit to kazupon/vuex that referenced this pull request Jul 22, 2017
ktsn pushed a commit that referenced this pull request Jul 22, 2017
* tweak getters.md from #791

* tweak some sections from #794

* translation about SSR notice at modules section (ref: #809)

* translation getters section (ref: #831)

* tweak testing section from #844
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

Successfully merging this pull request may close these issues.

2 participants