Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

passing third parameter in context.commit vuejs

mutations: {
    authenticate(state, { token, expiration }) {
        localStorage.setItem('token', token);
        localStorage.setItem('expiration', expiration);
    }
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #passing #parameter #vuejs
ADD COMMENT
Topic
Name
9+2 =