0👍
try
$store.commit('{fileName}/{mutatorName}', value);
in your case
$store.commit('store/setAuthentication', true);
0👍
Try this one.
import Vue from 'vue'
import Vuex from 'vuex'
Vue.use(Vuex)
export default new Vuex.Store({
state : {
authenticated: false,
},
mutations: {
setAuthentication(state, data) {
state.authenticated= data;
},
},
})
this.$store.commit('setAuthentication',true);
- [Vuejs]-Vuejs fix date from date received from php server
- [Vuejs]-I'm trying to create an app using Framework-7 Vuejs. I want to make my user stay logged in even after exiting the app using Firebase
Source:stackexchange.com