Evan You před 9 roky
rodič
revize
a4dc0ad700
1 změnil soubory, kde provedl 5 přidání a 0 odebrání
  1. 5 0
      examples/counter/Counter.vue

+ 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')
     }
   },