+ 1

var vm = new Vue({ }) OR new Vue({ }) ??

And what's the difference ? cuz both seems to work fine.. just curious.

3rd Nov 2020, 7:04 AM
Shreyansh Gaurav
Shreyansh Gaurav - avatar
2 Réponses
+ 4
Use the second option. Unless you need to refer to the vue model outside the constructor
3rd Nov 2020, 7:11 AM
Ore
Ore - avatar
+ 1
Alright Ore, so second one is the good practice, understood.
3rd Nov 2020, 7:44 AM
Shreyansh Gaurav
Shreyansh Gaurav - avatar