Created
March 13, 2019 03:37
-
-
Save webmasterdevlin/5f0c8d3b3d9379107d6e5180c44503f9 to your computer and use it in GitHub Desktop.
Vuex Store : src/store/index.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Vue from "vue"; // The Vue library | |
import Vuex from "vuex"; // The Vuex library | |
import heroes from "./modules/heroes"; // heroes module | |
import villains from "./modules/villains"; // villains is another module | |
Vue.use(Vuex); // using Vuex | |
export default new Vuex.Store({ | |
modules: { | |
heroes, // can also be written like heroes:heroes | |
villains, // can also be written like villains:villains | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment