I created a login page, where I made the conditions. if not logged in displays NAVBAR A if login is successful displays NAVBAR B. In the login process I created a local storgare storage in which a token is stored. I ask why is mounted late rendering? when the user is logged in it should render navbar B, it works if it is refreshed first
my code app.vue
<v-main>
<NavA v-if="token==='' "/> //if not login
<NavB v-if="token!='' "/> // if login success
<router-view />
</v-main>
data: () => ({
drawer: true,
token: '',
}),
mounted () {
this.token = localStorage.getItem('token')
},
token: nulland<NavA v-if="token == null "/>