I\'m trying to perform a dispatch on \'logOutUser\' in vuex store, and i\'m getting the following error message in respone:
TypeError: Cannot read pro
On a other note
firebase.auth.onAuthStateChanged(user => {
if(!app){
/* eslint-disable no-new */
app = new Vue({
el: '#app',
router,
store,
components: { App },
template: ' '
})
}
});
I bet you have this piece of code out of some tutorial because i was in that situation too but it will make your applicaton a lot slower on page reload because it will rerender everything everytime again.
I suggest you to use the onAuthStateChanged Event in your router (yes thats possible) and then check there for possible route blocks or not, will be a lot faster.
Im not home for code examples but i can send some later today if you want.