Using typescript - constructor vs mounted

typescript

#1

Hi

I’m using Typescript with Vue.JS.
Can anyone explain what is the difference between constructor and mounted function? When should I use each?

Thanks


#2

Constructor and mounted ? Do you mean Created instead of constructor?


#3

No, I was actually referring to a constructor.
When using Typescript you can create a class that extends Vue, and there can create a constructor

See example here : https://johnpapa.net/vue-typescript/ , under section “Refactoring the Code Files”


#4

I would like to know that.

Anyone can provide an answer?