Skip to content

Instantly share code, notes, and snippets.

@gearmobile
Created August 29, 2017 10:57
Show Gist options
  • Save gearmobile/d3a9fece710bab5365c08c34054d6b73 to your computer and use it in GitHub Desktop.
Save gearmobile/d3a9fece710bab5365c08c34054d6b73 to your computer and use it in GitHub Desktop.
Snippet Create New Store
"New Vue Store": {
"prefix": "vns",
"body": [
"import Vue from 'vue'",
"import Vuex from 'vuex'",
"",
"Vue.use(Vuex)",
"",
"const state = {",
" ${1://}",
"}",
"",
"const mutations = {",
" //",
"}",
"",
"const actions = {",
" //",
"}",
"",
"const getters = {",
" //",
"}",
"",
"const store = new Vuex.Store({",
" state,",
" mutations,",
" actions,",
" getters",
"})",
"",
"export default store",
""
],
"description": "New Vue Store"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment