Icontem

File: app/components/test-shopping-cart/store/index.js

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

Contents

Class file image Download
define([
    'vue',
    'vuex',
    'app/components/test-shopping-cart/store/actions',
    'app/components/test-shopping-cart/store/getters',
    'app/components/test-shopping-cart/store/modules/cart',
    'app/components/test-shopping-cart/store/modules/products',
], function (Vue, Vuex, actions, getters, cart, products) {

    Vue.use(Vuex);

    // A Vuex instance is created by combining the modules, getters, actions,
    // and getters.
    var store = new Vuex.Store({
        actions: actions,
        getters: getters,
        modules: {
            cart: cart,
            products: products
        }
    });

    return store;
});