diff --git a/examples/vuex-store/store/index.js b/examples/vuex-store/store/index.js index 8172cac5d8..b22221c9c7 100644 --- a/examples/vuex-store/store/index.js +++ b/examples/vuex-store/store/index.js @@ -1,14 +1,9 @@ -import Vuex from 'vuex' +export const state = () => ({ + counter: 0 +}) -import mutations from './mutations' - -const createStore = () => { - return new Vuex.Store({ - state: { - counter: 0 - }, - mutations - }) +export const mutations = { + increment(state) { + state.counter++ + } } - -export default createStore diff --git a/examples/vuex-store/store/mutations.js b/examples/vuex-store/store/mutations.js deleted file mode 100644 index 81783007a1..0000000000 --- a/examples/vuex-store/store/mutations.js +++ /dev/null @@ -1,7 +0,0 @@ -const mutations = { - increment(state) { - state.counter++ - } -} - -export default mutations