I have some problems with my Vue app. I'm trying to update user information that are stored in localStorage, and I'm updating it with websockets in App.vue in mounted function, like so:
window.Echo.channel("user." + this.userData.id).listen(".user-updated", (user) => {
localStorage.setItem('userData', JSON.stringify(user.user))
});
And so far, so good actually, localstorage is updating realtime, but the problem is, the user must refresh the page or change route so other information that is shown in another components could be updated.
Is there any way I can update all my components at once from App.vue?