1
0
Evan You 9 жил өмнө
parent
commit
a4dc0ad700

+ 5 - 0
examples/counter/Counter.vue

@@ -14,6 +14,11 @@ import vuex from './vuex'
 export default {
   data () {
     return {
+      // this is how we connect the component's state to
+      // a part of vuex's state tree. `vuex.get()` returns
+      // a Cursor, which is essentially an event emitter that
+      // lets you subscribe to value changes. When Vuex is used,
+      // Vue instances knows how to handle Cursors inside data.
       count: vuex.get('count')
     }
   },