Created
January 27, 2018 02:44
-
-
Save hibuno/dc701a2c5cbdbd6aa342fefd80a38cb6 to your computer and use it in GitHub Desktop.
Create vuex store
This file contains hidden or 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 Vuex from 'vuex' | |
const createStore = () => { | |
return new Vuex.Store({ | |
state: { | |
article: {} | |
}, | |
mutations: { | |
setArticle (state, data) { | |
state.article = data | |
} | |
} | |
}) | |
} | |
export default createStore |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment