[Vuejs]-How to get updated vm after use vue.js and axios?

4👍

Because axios.get is an asynchronous method, console.log is executed before the info is updated; To check the updated info, you’ll have to chain a then method after axios.get(...), something like axios.get(...).then(...).then(() => console.log(this.info)).

👤Psidom

Leave a comment