Created
August 6, 2021 12:44
-
-
Save andikasputra/6176bd4f581cecae82f8ffc11a526b95 to your computer and use it in GitHub Desktop.
php server side rendering
This file contains 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
// 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