Explorar o código

Clarify getter cache behavior (#831)

Andrew Duthie %!s(int64=8) %!d(string=hai) anos
pai
achega
41a5cbdb39
Modificáronse 1 ficheiros con 3 adicións e 1 borrados
  1. 3 1
      docs/en/getters.md

+ 3 - 1
docs/en/getters.md

@@ -12,7 +12,9 @@ computed: {
 
 If more than one component needs to make use of this, we have to either duplicate the function, or extract it into a shared helper and import it in multiple places - both are less than ideal.
 
-Vuex allows us to define "getters" in the store (think of them as computed properties for stores). Getters will receive the state as their 1st argument:
+Vuex allows us to define "getters" in the store. You can think of them as computed properties for stores. Like computed properties, a getter's result is cached based on its dependencies, and will only re-evaluate when some of its dependencies have changed.
+
+Getters will receive the state as their 1st argument:
 
 ``` js
 const store = new Vuex.Store({