[Vuejs]-Vuejs mounted hook in component not working as expected

0👍

this in nextTick function is not Vue component.
You can try using arrow function

this.$nextTick(() => {
    // some init codes for chart implementation
    console.log(this.$el); 
}

or closure:

var self = this
this.$nextTick(() => {
    // some init codes for chart implementation
    console.log(self.$el); 
}
👤ittus

Leave a comment