vuex mapped action several values code example
Example: vuex add multiple payload to mutation
// call
store.commit('authenticate', {
token,
expiration,
});
// mutation
mutations: {
authenticate(state, { token, expiration }) {
localStorage.setItem('token', token);
localStorage.setItem('expiration', expiration);
}
}