Skip to content

Instantly share code, notes, and snippets.

@teyfix
Created June 21, 2021 18:54
Show Gist options
  • Save teyfix/e7020aca9d1981ef9ffb0599892e45f7 to your computer and use it in GitHub Desktop.
Save teyfix/e7020aca9d1981ef9ffb0599892e45f7 to your computer and use it in GitHub Desktop.
vuex - setting user info
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