Преглед изворни кода

Clarify getter cache behavior (#831)

Andrew Duthie пре 8 година
родитељ
комит
41a5cbdb39
1 измењених фајлова са 3 додато и 1 уклоњено
  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({