Skip to content

Instantly share code, notes, and snippets.

@dvallin
Created November 29, 2017 16:46
Show Gist options
  • Save dvallin/e2c409a2a9dec03280a56ce7b3929349 to your computer and use it in GitHub Desktop.
Save dvallin/e2c409a2a9dec03280a56ce7b3929349 to your computer and use it in GitHub Desktop.
import * as Vuex from 'vuex';
import Vue from 'vue';
import {Task} from "@/domain/Task";
export const initialState = () => {
return {
tasks: [new Task("new task"), new Task("old task")]
}
};
export const getters = {};
export const mutations = {};
export const actions = {};
Vue.use(Vuex);
export default new Vuex.Store({
state: initialState(),
getters,
mutations,
actions
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment