What\'s the difference between this code:
new Vue({
data () {
return {
text: \'Hello, World\'
};
}
}).$mount(\'#app\')
>
In the example you provide, I don't believe there is really much difference or benefit. However, in other situations there may be a benefit. (I have never encountered situations like the following).
With $mount() you have more flexibility what element it will be
mounted on if that were to ever be necessary.
Similarly you if for some reason you need to instantiate the
instance before you actually know what element it will be mounted on
(maybe an element that is created dynamically) then you could mount
it later using vm.$mount()
Something like...
if(document.getElementById('some-element') != null){
// perform mount here
}