Skip to content

Instantly share code, notes, and snippets.

@duwaljyoti
Last active March 22, 2018 01:05
Show Gist options
  • Save duwaljyoti/7a7d39e57f84c18608a4acd8727ad021 to your computer and use it in GitHub Desktop.
Save duwaljyoti/7a7d39e57f84c18608a4acd8727ad021 to your computer and use it in GitHub Desktop.
import state from './state';
import actions from './actions';
import mutations from './mutations';
import noteActions from '../../note/store/actions';
Vue.use(Vuex);
const noteModule = {
state: {},
actions: noteActions,
mutations: {},
};
const userModule = {
state,
actions,
mutations,
};
// injecting modules instead of state, actions and mutations
const store = new Vuex.Store({
modules: {
userModule,
noteModule,
}
});
export default store;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment