Witam,
Problem dotyczy aktualizacji stanu aplikacji poprzez metodę authVerify:
methods: {
authVerify() {
alert('test')
const currentUser = firebase.auth().currentUser;
if(currentUser) {
this.$set(this, 'isLogged', true);
alert('tak');
} else {
alert('nie');
this.$set(this, 'isLogged', false);
}
}
},
beforeMount() {
this.authVerify();
},
watch: {
isLogged() {
console.log('zmiana')
}
}
Zmiana jest widoczna, ale dopiero po odświeżeniu. W jaki sposób robić to w przypadku zmiany stanu (dynamicznie)?