Created
June 21, 2021 18:54
-
-
Save teyfix/e7020aca9d1981ef9ffb0599892e45f7 to your computer and use it in GitHub Desktop.
vuex - setting user info
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
const store = Vuex.Store({ | |
state: { | |
user: null, | |
}, | |
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