From be41ae1c2fd9dc846ef94dcd3fc627b33efeb53c Mon Sep 17 00:00:00 2001 From: Alexander Lichter Date: Fri, 1 Feb 2019 13:02:41 +0000 Subject: [PATCH] example(vuex-store): change to module store (#4923) --- examples/vuex-store/store/index.js | 19 +++++++------------ examples/vuex-store/store/mutations.js | 7 ------- 2 files changed, 7 insertions(+), 19 deletions(-) delete mode 100644 examples/vuex-store/store/mutations.js 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