diferrence between new vue & vue.createapp

63 Views Asked by At

I'm studing Vue.js and I have learned that every Vue application starts by creating a new Vue instance with the Vue custructor new Vue({ })).

So far everything is clear, untill t I came across Vue.createApp({ }) which I don't understand if it does the same job as new Vue({ })) ? and if they can they be used interchangeably ? is one more recommended than the other ?

1

There are 1 best solutions below

5
Tachibana Shin On BEST ANSWER

it is different syntax for different vue versions from version vue 2.7 naruto you can only use createApp and for older versions you can only use new Vue