Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
php server side rendering
// js/store.js
import Vue from 'vue'
import Vuex from 'vuex'
Vue.use(Vuex)
export function createStore() {
return new Vuex.Store({
state: {
user: {}
},
mutations: {
setUser(state, { user }) {
state.user = user;
},
},
})
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment