As a newcomer to Vue.js and other reactive frameworks, I am still learning the ropes.
I have a component that needs to update whenever there is a change. The goal is to display a balance from a specific login.
<li :key="balance">Balance {{ balance }}</li>
data() {
return {
games: [],
balance: '101',
error: ''
}
}
async created() {
try{
this.balance = await WalletService.getBalance();
} catch(err){
console.log(err.message);
}
}
After my debugging efforts, it seems like the created() function is not triggered after my router.push() when the user logs in. How can I make sure that created() is executed after router.push?