I have problem with VueJS

Hello everyone, today I start to learn about VueJS but I am so confusing about its structure. First time, I learnt from a video by freeCodeCamp channel on YouTube ( Vue.js Course for Beginners [2021 Tutorial] - YouTube). After that, I found a book to learn: “Getting to
Know Vue.js
Learn to Build Single Page Applications
in Vue from Scratch” by Brett Nelson. The problem I faced was that when I follow the tutorial on YouTube, I used “unpkg” to run and it worked but with the book, they use “jsdelivr” and when I used the same code with the code I used for “unpkg”, it didn’t work. I have no idea about what I should learn because 2 tutorials from 2 sources I used were totally different.
Thank you for taking time to help me.


Code from Youtube


Code from book but I use “unpkg” (it works when i use “jsdelivr”)

I assume it is a Vue 2 vs Vue 3 issue and not related to the CDN (other than one is using V2 and one is using V3).

The new Vue() is Vue 2 syntax and createApp() is Vue 3.


I would suggest you use Vite for the apps and stick to new tutorials that teach the latest version and syntax (use the official docs as well).

After that, you can look into the differences between 2 and 3 if you need to know more (say to be able to work with both versions).

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.