I'm currently facing an issue with my Vue app related to updating user information stored in localStorage. I've implemented a solution using websockets in App.vue within the mounted function, as shown below:
window.Echo.channel("user." + this.userData.id).listen(".user-updated", (user) => {
localStorage.setItem('userData', JSON.stringify(user.user))
});
While the real-time update of localStorage is working fine, the challenge lies in ensuring that all components display the updated information without requiring the user to refresh the page or switch routes.
Is there a method to simultaneously update all components from App.vue?