I have a project with Vuejs and Vue-Router. When a user pay in (login) system, the server return a file Json with token, username and first name, this file is stored in localstorage for be used in following requests. The first name is used in layout for show a message welcome in the navbar. After logout, localstorage is cleared and the problem is here, when other user pay in the message welcome not reload with new first name.
<v-chip>{{bienvenida}}</v-chip>
computed: {
bienvenida() {
const user = JSON.parse(localStorage.getItem("user"));
return user ? `Bienvenido ${user.firstName}` : "";
}
}