File: app/components/test-counter/counter.js

Recommend this page to a friend!
  Classes of Sergey Beskorovayniy   Vuex Examples   app/components/test-counter/counter.js   Download  
File: app/components/test-counter/counter.js
Role: Auxiliary script
Content type: text/plain
Description: Auxiliary script
Class: Vuex Examples
Example apps using Vuex state management pattern
Author: By
Last change: Update of app/components/test-counter/counter.js
Date: 2 years ago
Size: 538 bytes
 

Contents

Class file image Download
define([ 'vuex', 'app/components/test-counter/store', 'text!app/components/test-counter/counter.html', ], function (Vuex, store, template) { // Create component class var Counter = { name: 'Counter', store: store, template: template, computed: Vuex.mapGetters([ 'evenOrOdd' ]), methods: Vuex.mapActions([ 'increment', 'decrement', 'incrementIfOdd', 'incrementAsync' ]) } return Counter; });