Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

diferrence between new vue & vue.createapp

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 ?

like image 631
atif thb Avatar asked Jan 19 '26 12:01

atif thb


1 Answers

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

like image 197
Tachibana Shin Avatar answered Jan 22 '26 06:01

Tachibana Shin