Vue JS Crash Course (2019)

Поділитися
Вставка
  • Опубліковано 18 гру 2024

КОМЕНТАРІ • 1,2 тис.

  • @TraversyMedia
    @TraversyMedia  6 років тому +281

    Guys, check out www.netlify.com, not just because they sponsored this video but because it is literally one of my favorite platforms for deploying static sites and front end apps. Any sponsor I have, I believe in and believe they benefit my audience. The free tier is incredible and easy to use.

    • @stctheproducer
      @stctheproducer 6 років тому +5

      They are really good! My first static site is still hosted by them 😁

    • @markokoth5609
      @markokoth5609 6 років тому +5

      Next do a django crash course please

    • @TraversyMedia
      @TraversyMedia  6 років тому +14

      Django crash will be updated to 2.x soon

    • @gknt7234
      @gknt7234 6 років тому +2

      So, netlify supports you, and you should make a "Netlify CMS" video!

    • @brawndo8726
      @brawndo8726 6 років тому

      Netlify is solid. Best kept secret in the industry.

  • @bakarandguladze
    @bakarandguladze 4 роки тому +624

    Slides:
    0:56 - What is Vue?
    1:18 - Why use Vue?
    2:37 - What you should know before learning Vue?
    3:10 - Components
    4:39 - Anatomy of a Component
    Setup:
    7:20 - Installation
    8:46 - Create an app through Commandline
    10:37 - Create an app through UI
    Coding:
    13:10 - Brief review
    19:25 - Data
    21:35 - Creating "Todos" component
    26:05 - Creating "TodoItem" component (nested)
    27:20 - Outputting TodoItems
    29:30 - Implementing 'is-complete'
    31:35 - Event (checkbox)
    34:35 - Deleting
    39:47 - Adding a header
    41:45 - Adding a form
    43:53 - Fixing the button
    44:20 - Adding functionality to AddTodo
    50:33 - Http Requests:
    53:25 - get
    55:25 - post
    58:30 - delete
    59:37 - Vue Router
    1:07:09 - Build

  • @GG-hl4zp
    @GG-hl4zp 4 роки тому +245

    In case someone has issue there: 25:22

    • @GG-hl4zp
      @GG-hl4zp 4 роки тому +19

      I just spent 40 minutes to troubleshoot why it was not working. I see I should have watched the video for 15 seconds longer last night...

    • @jancifoxhound6380
      @jancifoxhound6380 4 роки тому +1

      sweet. Thank you!

    • @bmehder
      @bmehder 4 роки тому +5

      I am SOOO glad you mentioned this. I almost threw in the towel. :-)

    • @ラックー
      @ラックー 4 роки тому +1

      Thanks man, that helped a lot.

    • @drshahedk
      @drshahedk 4 роки тому +1

      Thank you, this really helped, was stuck for a while.

  • @RenanVital
    @RenanVital 5 років тому +162

    Minute 50:
    Other method to prevent form default is add 'prevent' after @submit
    Example:

    • @josephastrahan6403
      @josephastrahan6403 5 років тому +2

      Agreed, I just read up about this also, much better way to do it and should be mentioned!

    • @albertchung7641
      @albertchung7641 5 років тому +2

      Nice tip

    • @LucXX36
      @LucXX36 5 років тому +2

      Helped me too, I mean, what Brad shows works also fine, but beginning from 45:34 it helps to add your suggestion into the code. rather than Brad's. But both work, your suggestion is shorter. Thanks.

    • @Universestyle
      @Universestyle 4 роки тому +1

      Can someone explain to me, in more detail what "prevent" does and why we need it, and why there is an "e" in "addTodo(e)?

    • @RenanVital
      @RenanVital 4 роки тому +1

      ​@@Universestyle When you click button [submit] or [whatever], the default is send the form. Use prevent for blocked this default. Use addTodo for do what you want.

  • @nadir2k
    @nadir2k 6 років тому +304

    So basically now you're redoing all the crash courses, Great Job, actually that is what we all need. There were a lot of new additions in these technologies since your last courses.

    • @TraversyMedia
      @TraversyMedia  6 років тому +60

      Yes, all my crash courses were out of date using older versions. Also I have grown as a developer since then

    • @nadir2k
      @nadir2k 6 років тому +4

      @@TraversyMedia When exactly does a developer reach the peak point of learning :D

    • @TraversyMedia
      @TraversyMedia  6 років тому +56

      @@nadir2k Absolutley never...I always and will always consider myself a student because things are always changing and you have to keep learning to keep up

    • @mitjed
      @mitjed 6 років тому +1

      @@TraversyMedia Please do a dart or flutter crash course, thank you very much!

    • @ouza1430
      @ouza1430 6 років тому +1

      @@TraversyMedia I love your work... thank you so much for sharing your knowledge in such easy way

  • @AbdellahRamadan
    @AbdellahRamadan 5 років тому +4

    You are actually the best. I have never learned a framework in 1hr.
    I just followed this crash course to the end and now I have a next project I am writing in Vue.
    Thank you so much.

  • @leonardkiano4591
    @leonardkiano4591 4 роки тому

    If anyone is still having trouble with uuid not being found, use vue-uuid like this
    1. run - npm i vue-uuid
    2. in the script block add the following import - import { uuid } from 'vue-uuid';
    3. Save file
    It should work.
    Awesome crash course as always!!!

  • @asdfblkqrqra
    @asdfblkqrqra 4 роки тому +27

    47:20 substitute with: import { v4 as uuidv4 } from 'uuid';
    and then in the script: id: uuidv4(),

  • @AWildLukeAppeared
    @AWildLukeAppeared 5 років тому +2

    Brad, You're a truly good man.
    I'm a self-taught developer and I've been Coding less than 18 months.
    Your tutorials have not only helped me get a job as a developer, but they are helping me keep at the top of my game, and continuously progress myself.
    I can truly say of all the content I've consumed in my short 18 months of coding, your tutorials always come out on top.

  • @ddalejandroo
    @ddalejandroo 5 років тому +157

    Brad you are the man!!! been following you for about 2 years, and now you're almost at 1 million followers! crazy.. anyway, I followed this tutorial and found a warning when implementing the deleteTodo with the axios json.
    this line > .then(res => this.todos = this.todos.filter(todo => todo.id !== id))
    I was getting the warning that res was defined but not never used... so I fixed it, by just passing it at the end...
    like this> .then(res => this.todos = this.todos.filter(todo => todo.id !== id, res.data))
    anyways hope this helps someone out if they encounter the same thing..
    Cheers and thank you for your amazing material!

    • @jensdemuynck
      @jensdemuynck 5 років тому +3

      Thanks! :D

    • @rkq_
      @rkq_ 5 років тому +2

      thank you. you solved my error.

    • @JesterUndead
      @JesterUndead 4 роки тому +3

      Dude, thank you! I've been staring at the screen for like an hour because of this. You're the man!

    • @paynetang
      @paynetang 4 роки тому +2

      Hi komplex, it solves the error for me as well! Thanks
      But I actually dont understand this part, can you please share what the comma means in the code?

    • @PenStab
      @PenStab 4 роки тому +10

      You can also do this: .then(res => this.todos = this.todos.filter( res.data.id !== id )). This way you're actually using the response you're getting. You look at the data that's retrieved which is a single todo and then compare its id property to the id of the todo you deleted. Then the filter method filters it out

  • @samu350
    @samu350 6 років тому +23

    If you ever question your life I hope you don't because you've been so much of a help to the community and everyone in a way most people wouldn't do, I love your content man please keep on the good work, absolutely no one does tutorials the same way you do. Congrats on 600k subs! Do some Laravel + Vue.js ;)

  • @michaelgtz4873
    @michaelgtz4873 4 роки тому +9

    59:08 Don't need res => here, just assign this.todos the way it is. I'm not a pro. But we don't use the response. So far.

    • @AdnanAbbasi_LXXVIII
      @AdnanAbbasi_LXXVIII 4 роки тому

      Thank you so much Michael for pointing this out, I don't know how I overlooked this. This made the app worked!

  • @hughmungus1767
    @hughmungus1767 4 роки тому

    I'm trying to imagine what would justify anyone giving this video a thumbs down. This is one of the very best UA-cam videos I've seen and I say that as a professional IT instructor. I also happen to be new to Vue.js, vue cli, and VSCode yet after watching this video - and following all the instructions very closely to get my own copy of the app running - I feel like I have a strong working knowledge of how to use these tools which were so unfamiliar just a few hours ago.
    The course is first rate. It includes exactly the sorts of things I needed to know to get started with Vue.js and VSCode and doesn't throw in a lot of fluff. Everything is explained in a level of detail that was just right for me. The ongoing exercise seemed to be just the right level of difficulty for a beginner like me. I still have lots of learn but I feel like I will be able to learn it with the help of this video, other videos by the same (and different) presenters, and some one-on-one help on the Vue.js forums.
    Thank you VERY MUCH, Brad! If I could give you 10 stars (out of 5), I would but I gave you what I could, a like, and I clicked the Subscribe button. As far as I'm concerned, this course sets the standard for what ALL video courses should be.

  • @soyaro
    @soyaro 4 роки тому

    Brad helped me do my undergrad project through his Laravel crash course. I also sold a modified copy of the same to a classmate for $50-haha . And now two years into full-time employment, he still teaches me a lot of new stuff I apply at work. Thanks Brad! Keep up the good work.

  • @Pzdrs
    @Pzdrs 4 роки тому +42

    34:10 i thought u cant update a prop from a child component, it throws an error Unexpected mutation of "todo" prop vue/no-mutating-props

    • @9vg80zm4lybt0kb
      @9vg80zm4lybt0kb 4 роки тому +4

      I had the same issue. You can use the same strategy he uses at 34:30 for deleting the todo item

    • @tmattoneill
      @tmattoneill 4 роки тому +9

      this needs to be higher and addressed. It's a showstopper. Why aren't more people mentioning this?

    • @spuitelf89
      @spuitelf89 4 роки тому +1

      Im having the same error being trown, and havent figured a work around yet..

    • @theoligarchist1503
      @theoligarchist1503 4 роки тому

      @@tmattoneill because not everyone does the practicals, i am here to see what is Vue; since i am working on Generating JS from Rust, am researching to find out if these Frameworks give me any advantage over generating VanillaJS.
      :-)

    • @samarmohan9891
      @samarmohan9891 4 роки тому +1

      Use Vue 2

  • @cseale61
    @cseale61 5 років тому

    Not bad, not bad at all. I watched this course a few weeks ago, and along with the official documentation, I converted one of our Dashboards (originally written in Angular 4) to Vue.js. Now Upper Management has given the go ahead to do all of our upcoming projects in Vue. Without saying exactly who I work for, it's one of the largest cable and broadband providers in the country. This tutorial took the sting out of the learning process. I can say this much without hesitation - it beats all the versions of Angular, hands down.

  • @shmuelelkis7834
    @shmuelelkis7834 4 роки тому +13

    this is so much easier than React , Thank you so much for this course man !!

  • @qudratxojamusayev6785
    @qudratxojamusayev6785 4 роки тому

    Hello, Brad. You've saved millions of minutes that people may have spent to crawl documentation and learn all you say. Thank you, you're doing great job.

  • @bestrelaxmusic1078
    @bestrelaxmusic1078 6 років тому +3

    Hello from Russia! I watched many of your lessons and want to say thank you for your work. You are one of the few who can TEACH!

  • @carlhlazo931
    @carlhlazo931 4 роки тому

    Wonderful crash course. Your approach worked for me. You started from an empty slate all the way to a simple functioning app without leaving out some often overlooked set up nuances. I have watched quite a number of these crash courses and I was left with knowledge gaps. You started with the basics of installing Node and NPM for example and worked your way all through configuring the IDE using extensions. This was excellent for me. This crash course is my reference point for some basics in my journey to learning more about Vue JS. Great job and thank you for taking the time to do it. Look forward to more of your courses.

  • @IsaacAsante17
    @IsaacAsante17 6 років тому +50

    Brad is trying to kill us with a tsunami of useful knowledge. How are you so fast at creating valuable tutorials?! Now I don't know what to watch!

    • @maskman4821
      @maskman4821 6 років тому

      I suggest you go with MEAN, MERN, MEVN....

  • @emmanuelobiajuru7922
    @emmanuelobiajuru7922 6 років тому +2

    Thanks Brad, ever since i found your channel my web development skills have improved tremendously. The way you teach its quiet clear that you seek to impact lives.

  • @yltfy
    @yltfy 4 роки тому +3

    Nice video! By the way, the checkbox "markCompleted" function (33:50) is now considered as an anti-pattern and has been deprecated in Vue 3.0, because it modifies props in the child component. It's a good exercise for audiences to change this part using @emit.

    • @sanjadaic5296
      @sanjadaic5296 4 роки тому

      Can you please help me how to solve this?

  • @shadow_3213
    @shadow_3213 4 роки тому

    You are the reason why I removed the AD BLOCKER so that you get money from the advertising, unfortunately I do not have a credit card otherwise I would be a patreon of you!!! Thank you very much for all your videos !!!
    Best ever !!!!!!!

  • @newworld3844
    @newworld3844 6 років тому +47

    Can’t wait for the Vue Front To Back Course!!!

  • @michaelgtz4873
    @michaelgtz4873 4 роки тому

    I've watched quite a few tutorials on the web, and all those guys(authors) are definetely specialists in their area, no doubt. But ony few of em can teach and explain really well. You are a good teacher, man. I enjoy your videos, thanks.

  • @seesnapdochannel2229
    @seesnapdochannel2229 5 років тому +193

    Great video, one thing I would change. Your variable / component names are very confusing (Todo, Todos, etc..) if you made those more distinct, it would be much clearer which item was being referenced at all times

    • @songangte29
      @songangte29 5 років тому +37

      Totally agree. for me it ruined a large part of the video. i ended up having to rewatch again and again. Please change the variable names. it is proper programming convention

    • @sahilvig22
      @sahilvig22 5 років тому +4

      Same. That is the ONLY thing I dislike sometimes.

    • @Barykada
      @Barykada 5 років тому

      I agree but that actually helped me more than I thought! I've done this myself and that way I started playing with the code and understood how the data is linked to each other :)

    • @norberthelandi
      @norberthelandi 4 роки тому +1

      Couldn't agree more. I am so confused with the names...

    • @majs6708
      @majs6708 4 роки тому +2

      All I could hear was "Todo" "Todos" .

  • @samarmohan9891
    @samarmohan9891 4 роки тому +1

    I like Vue the most because of how it splits everything into components BUT in the components, it goes into Template, Scripts, and Styles. React doesn't separate these as well and it has a bunch of unnecessary files (from create-react-app).

  • @haciendadad
    @haciendadad 5 років тому +5

    If created is not firing, it may be because you put that method in the methods array instead of it being at the same level as methods. Lifecycle hooks (created, mounted, etc ) have to be at the same level as "methods".

    • @AlissonSandes
      @AlissonSandes 5 років тому

      Thanks, I was stuck with this problem!

    • @haciendadad
      @haciendadad 5 років тому

      @@AlissonSandes I hear it is a common problem. I'm glad the comment was helpful for you!

    • @worldlinx
      @worldlinx 5 років тому +1

      oh gosh, I spend a day trying to figure out what's wrong... finally, this solved it for me too!!!

  • @kesicrack1
    @kesicrack1 4 роки тому

    Best crash course! I learnt vue 3 years but forgot a lot of things, this is a very good refresher.

  • @mrmomo42
    @mrmomo42 4 роки тому +123

    My mom asked me to send her the link because his soothing voice made her sleep xD

    • @ahxel8173
      @ahxel8173 4 роки тому +1

      Your mom doesn't have to search for a TV channel anymore before going to bed. Lol.

    • @listmaker9339
      @listmaker9339 4 роки тому +11

      Corey schafer is also a good one! Your mom can learn python in the end.

    • @abdelkadersebihi6983
      @abdelkadersebihi6983 4 роки тому

      Lol

    • @rrohitamalan
      @rrohitamalan 4 роки тому

      😂

    • @TheWyntas
      @TheWyntas 4 роки тому +2

      lol, that's kinda true. i do get sleepy while listening to him xD

  • @zedleclair6638
    @zedleclair6638 4 роки тому

    27:04 styling:
    .todo-item {
    background-color: #f4f4f4;
    padding: 10px;
    border-bottom: 1px #ccc dotted;
    }
    .is-complete {
    text-decoration: line-through;
    }
    .del {
    background: #ff0000;
    color: #fff;
    border: none;
    padding: 5px 9px;
    border-radius: 50%;
    cursor: pointer;
    float: right;
    }

  • @Shannxy
    @Shannxy 4 роки тому +21

    59:17 I did this, but why do you not get the same error of "res is defined but never used"

    • @bmehder
      @bmehder 4 роки тому +29

      The error is coming from ESLint. To prevent the error, you can add "// eslint-disable-next-line " (without the double quotes) right above the line of code causing the error (witch I believe is the .then() method). You can also disable the rule in the Vue UI in Configration > ESLint Configuration > "Rules" tab > vue/no-unused-vars, and change the "Error (Default)" to either "Off" or "Warning". I used the // eslint-disable-next-line, but then I found the plugin configuration a couple of hours later.

    • @HinorikaC
      @HinorikaC 4 роки тому +1

      @@bmehder Thanks!

    • @oxanasf6369
      @oxanasf6369 4 роки тому +1

      @@bmehder Thanks!

    • @akashaj4660
      @akashaj4660 4 роки тому +1

      @@bmehder Thanks a lot!

    • @steveroe_5621
      @steveroe_5621 4 роки тому +1

      @@bmehder Great job thank you

  • @techbizlife
    @techbizlife 4 роки тому

    1:30why use vue
    2:35
    JavaScript fundamentals, objects, arrays, conditions,etc
    3:10
    To do app
    4:38
    Output, functionality, style
    5:42
    Vue-cli3
    6:36vuex for state management
    7:16install vue cli
    Node.js
    Vue.js dectools chrome extension
    Vuejs.org get started
    Cli.vuejs.org
    9:10Vue create test
    9:55 cd test, ls, npm run test
    10:00npm install serve
    10:15localhost:8080
    10:30cd ..
    vue ui
    localhost:8000/project/select
    10:40Vue project manager
    Projects create import
    10:45Vue project manager
    create, 10:58users/traversy/desktop/ create a new project here
    11:03
    Create a new project
    ❤️Details ❤️presets❤️ features ❤️confirmation
    Project folder:
    vue_crash_todolist
    Package manager:
    npm yarn
    Additional options:
    Overwrite target folder if exists
    Git repository:
    Initialize git repository (recommended)
    Initial commit message (optional)
    11:15❤️next, presets
    Default:Babel eslint
    manual:
    remote:git
    11:30❤️
    localhost:8000/dashboard/
    Dashboard
    Plugin
    dependencies
    Configurations
    Tasks
    13:00❤️vscode
    13:30vue_crash_todolist
    node_modules
    Public
    Src
    Gitignore
    Babel.config.js
    Package-lock.json
    Package.json
    Readme.md
    13:29❤️ package.json
    14:00❤️ public/index.html
    14:35❤️Src/main.js
    15:05❤️Src/app.vue
    21:45 components/Todos.vue

  • @GEEKLEAK25
    @GEEKLEAK25 5 років тому +28

    You can also write "scaffold" in a new empty Vue file and you will get all the three part of the file.

    • @SkutterGameplays
      @SkutterGameplays 4 роки тому +1

      on new version its just "vue" for anyone wondering

  • @indignocat
    @indignocat 5 років тому +2

    @33:22 - If the project fails to compile in Vue.js 2.x when using vue/cli@^4 after adding line 15...
    ```
    methods {
    markComplete() {
    console.log(123)
    }
    }
    ```
    ...just add `window.` before `console.log`, so that line 15 reads `window.console.log(123)` instead.
    Problem solved.

  • @ak-loz
    @ak-loz 5 років тому +6

    At 59 minutes, if you're getting an error: 'resp' is defined but never used.
    We can actually change the resp to an empty parenthesis () to remove the eslinting error.

  • @catonalake
    @catonalake 5 років тому +2

    First - love this video and really appreciate the time you have invested in taking us through this. Thank you! :)
    Second - thank you Vue for the developer extension in chrome - without that I would have spent even more time debugging.. word to the wise - install that :P
    Last but not least, for those that may be using the latest Version of Vue and struggling with emitting events to the parent app component, I found that:
    - the click event on the TodoItem component worked well as noted in this video (using the parameter todo.id)
    - emitting the event from Todos to the app root required me to pass $event as the parm (not the todo.id) in both the Todos and App components
    I wanted to share as this took several hours of trial and error, countless searches on the web, perusing stack overflow, vue's docs and, of course, some censored words aimed at the monitor here and there :oP
    I"m very new to this framework, so it could be some kind of version issue.... either way, I thought i'd give back here with a solution to what others may run across

    • @bm558
      @bm558 4 роки тому

      Would you mind sharing the element's code that got your passed this point please? I'm currently getting `TypeError: Cannot read property '$emit' of null` when attempting to delete.

    • @makingspidersense
      @makingspidersense 4 роки тому

      My god, thank you!! I have been stuck on this part for too long and that worked!
      .

  • @itpunkie
    @itpunkie 6 років тому +19

    Thanks for another nice vid! I already have experience with VueJS so maybe this video is not for me, but I've started my "VueJS career" from your previous VueJs starter videos. And your vids helped me a lot!
    Can I make a small notice here? 28:03 - actually, we don't need that extra wrapper element here now, because we can iterate that component directly. You can replace this:
    with this:
    That's because your component already has its' own wrapper inside a component code. So your rendered HTML will be something like:
    Todo Item
    instead of:
    Todo Item
    I do not criticize your video, but it may be useful for beginners. Thanks again, Brad!

  • @jimiscott
    @jimiscott 6 років тому +1

    From a professional dev evaluating Vue this is an awesome intro video. Well done.

  • @mikaylatheengineer9631
    @mikaylatheengineer9631 4 роки тому +5

    vue is already way cooler than react, loved this tutorial/framework

  • @SolidousMdz
    @SolidousMdz 6 років тому +1

    Thanks Brad. One thing that helps me understand a bit when learning a new framework is to comment near every appearance of one of the framework's function. Like
    ```//vue method
    data(){ ... }```
    My first gotcha moment was when I finally understood where basic JS stops and where you are calling lets say a React method like render() etc, the separation of what is vanilla and what is a framework/lib is important to understand in my opinion.

  • @alastairdallas
    @alastairdallas 5 років тому +4

    Thank you for making it so easy to compare Angular, React, and Vue. Vue seems much smaller because it installs centrally (I think), but here's what I saw in terms of files on disk:
    Angular: 29,000 files = 292MB for the project; dist: 22 files = 18.3MB
    React: 28,200 files = 119MB for the project; dist: 14 files = 723k
    Vue: 209 files = 7.28MB for the project; dist: 9 files = 824k

  • @josephs.8474
    @josephs.8474 6 років тому

    What a coincidence, I was searching for a vue.js crash course in your channel (updated) since last week. And then this came out. Thanks Brad!

  • @Alessandro-nq3tm
    @Alessandro-nq3tm 6 років тому +3

    Wooo near 600k subs!! You really deserve this Brad.

  • @fernandoantonio2
    @fernandoantonio2 6 років тому +1

    You can also toggle the 'completed' attribute by adding v-on:click="todo.completed = !todo.completed" on the input tag, I'd say it's a cleaner approach.

  • @apoc5412
    @apoc5412 5 років тому +4

    33:37 Any idea how to solve this error with console.log(123) when I was testing it out this appeared -> Unexpected console statement.eslint(no-console)?

    • @BFKxFroMxHollanD
      @BFKxFroMxHollanD 5 років тому +1

      same problem!

    • @lipricon01
      @lipricon01 5 років тому +2

      in package.json file find object «eslintConfig», then in "rules" attribute add "no-console": "off"

    • @UpTballA
      @UpTballA 4 роки тому +1

      try: window.console.log(123) instead of console.log(123)

    • @eraazana1257
      @eraazana1257 4 роки тому

      if eslintConfig doesnt work for you, put /* eslint-disable-line no-console */ after the console.log();

  • @tswtdt555
    @tswtdt555 5 років тому

    I was just recently introduced to Vue. Currently building my website with it and changing out of notepad with a new design. Great video. You keep it simple and its easy to keep up with you. This helped a lot. Thanks.

  • @DORIYASPIELMAN1234
    @DORIYASPIELMAN1234 4 роки тому +6

    Awesome course:) in the deleteTodo method, you didn't change the filter with the res.data, so it didn't compile.

    • @ByakugaK
      @ByakugaK 4 роки тому

      I just got rid of the arrow function and it compiled. Do you know if that would a good way to handle the http response?

  • @yoemasey
    @yoemasey 4 роки тому

    You have become my Guru(Teacher). The way you explain things are fantabulous and easy to understand. A big thank you from the other side of the world :)

  • @vijakrajpoot
    @vijakrajpoot 4 роки тому +9

    This is a wonderful crash course. The very first time my life I wrote a frontend app and really enjoyed the way you explained. Thanks for your amazing work. One quick note in AddTodo.vue uuid.v4() doesn't work. It seems I am using v12.16.1. I had to use import { v4 as uuidv4 } from 'uuid'; and id: uuidv4 in addTodo() . Once again thanks.

  • @michaelcacciano817
    @michaelcacciano817 5 років тому

    If for some reason you just installed vue-router before hearing that it was going to re-write your App.vue, you should be able to just ctrl + z and get the code back for your App.vue - Thanks for the all the great tutorials Brad! Whenever someone asks me where I leanred, I direct them promptly to your channel. I'm not sure if I would of gotten to the point where I was able to get my first dev job 3 months ago without you!

  • @CodeAndCourse
    @CodeAndCourse 5 років тому +25

    As a beginner, Spending 1 week on Angular vs 1 day in Vue. I feel comfortable with Vue than Angular.

    • @TomislavKaljevic
      @TomislavKaljevic 4 роки тому

      It speaks about you, not about Angular.

    • @Miklaous
      @Miklaous 4 роки тому +1

      @@TomislavKaljevic rude

  • @donathon680
    @donathon680 6 років тому

    One of the best tutorials I've watched, seriously. Coming from a PHP background and picked it up exactly at the right tempo and learned some ES6 stuff at the same time.

  • @PunitDiwan
    @PunitDiwan 6 років тому +11

    @TraversyMedia, Great Video, I am eagerly Waiting for Vuex Crash Course. I have a small project to manage my ERP and I am thinking to use Vue.js for that. Its basically an admin Component.

  • @azebgebreyesus7115
    @azebgebreyesus7115 3 роки тому

    This is fantastic..I am doing school project using vue.js framework. and this video is a life saver.
    keep doing more videos.

  • @alenv808
    @alenv808 6 років тому +3

    Thank you! I just started going hard into VueJS so this is very helpful

  • @mukulsoni8263
    @mukulsoni8263 4 роки тому

    This video is really awesome and clean. I just got the overview, the basics of Vue, CURD, and API interaction in just an hour.
    Thanks you are awesome :)

  • @jenusdy
    @jenusdy 4 роки тому +5

    26:15 error 'res' is defined but never used no-unused-vars

  • @kevinrakestraw3787
    @kevinrakestraw3787 4 роки тому

    To keep the checkbox from reversing the functionality when loading a todo that's already completed. You can use v-model="todo.completed" on the checkbox, instead of referencing the markComplete() function. That way it's conditionally bound, similar to the "is-completed" class condition.

  • @bjornarmar2462
    @bjornarmar2462 4 роки тому +8

    59:20 - Kept getting an error about res being instantiated but never called, and one of the below solutions resulted in a similar error saying that todo was instantiated but never called, and one of the other solutions simply broke the delete method entirely. Here's the one resolution I found that works the best:
    deleteTodo(id) {
    axios.delete(`jsonplaceholder.typicode.com/todos/${id}`)
    .then(() => this.todos = this.todos.filter(todo => todo.id !== id))
    .catch(err => console.log(err));
    }

    • @cassandraz3035
      @cassandraz3035 4 роки тому

      Hey! I think this makes a bug... when you enter several of your own TODOs, and then try to delete one of them, it bulk deletes all of the ones you entered

    • @cassandraz3035
      @cassandraz3035 4 роки тому

      stackoverflow.com/questions/55505768/multiple-todos-in-todo-app-getting-same-id-from-json-placeholder .... may be because of this.... I will investigate

    • @cassandraz3035
      @cassandraz3035 4 роки тому

      unfortunately..... it seems it has been a problem for a loooooong time. No solution

  • @alejandroromero3783
    @alejandroromero3783 4 роки тому +1

    If you want to check items that are completed at the begin, you only have to add this to checkbox input template:
    v-bind:checked="todo.completed"

  • @gaborszekely8387
    @gaborszekely8387 5 років тому +5

    Any chance you could do an intermediate-level series for Vue/Angular? I feel like everyone only focuses on these introductory level videos but I would love to see some of the more advanced features of these frameworks as well. Cheers, and happy 2019!

  • @caterpilar
    @caterpilar 4 роки тому +2

    I'm doing todo list as interview task, my first Vue project, as I used React before. This Vue rendering logic made me instantly miss React

  • @damagedmybrain
    @damagedmybrain 5 років тому +17

    When can we expect a Vue front to back course? :p WAITING EAGERLY :P

  • @jonathanmohan2846
    @jonathanmohan2846 5 років тому

    Love your style. I'm just a newbie as I just landed my first front end development job and your method of teaching is working well for me after hours learning. Thank you!

  • @KarlooAudi
    @KarlooAudi 6 років тому +41

    How long time does it take you to learn 1000 languages in your lifetime, this is so crazy!

    • @TraversyMedia
      @TraversyMedia  6 років тому +42

      With both frameworks and languages, once you learn two, you start to see they are all pretty similar there is just different terminology and syntax. The core concepts are the same or at least pretty close

    • @TraversyMedia
      @TraversyMedia  6 років тому +18

      @@ilya-zhidkov I think he was exagerating and I think he meant frameworks/libraries/etc as well :)

    • @TraversyMedia
      @TraversyMedia  6 років тому +17

      @@ilya-zhidkov Also you can add Ruby to that list if it's worth anything these days :(

    • @krantinebhwani6125
      @krantinebhwani6125 6 років тому +11

      @@TraversyMedia First I've seen such a recent comment from you so I'll take this chance to say thank you hoping you will see it. You have single handedly helped me through a very bad time in my life and also helped me find a job I'm so incredibly grateful. I owe it all to you (and some of the design / styling tips with travis@Devtips). I haven't stopped learning from you either, the learning continues with vuejs! Thanks a lot man.

    • @TraversyMedia
      @TraversyMedia  6 років тому +7

      @Kranti Nebhwani I am glad I could be of any help at all. Thanks for watching my videos :)

  • @iffipifi1
    @iffipifi1 3 роки тому +1

    29 Jan 2021, starting my Vue journey by this course, Wish me luck guys

  • @mayurkapadia3985
    @mayurkapadia3985 6 років тому +4

    Thank you Sir ... I dont have any words for your awesome, great job... Hatsss of to u sir...
    😊👍 .

  • @himmelsturmerIX
    @himmelsturmerIX 4 роки тому +1

    31:30 to toggle complete and incomplete. The example used is somewhat problematic. Notice that Todo 2 which start as completed have the checkbox still unchecked.
    You can do the whole thing without writing the markComplete method.
    Just do the checkbox like this:

  • @damilareemmanuel
    @damilareemmanuel 6 років тому +31

    Notification Squad. Thanks Brad

  • @samarmohan9891
    @samarmohan9891 4 роки тому

    54:50, After the limit parameter, add "&completed=false" so the line-throughs don't get mixed up.

  • @yellowjohn3169
    @yellowjohn3169 5 років тому +3

    When coding deleteTodo(id), it always shows " error: 'res' is defined but never used (no-unused-vars)" and cannot compile. My code is the same as yours.

    • @Pete_Sahat
      @Pete_Sahat 5 років тому +5

      That would be because you are defining res but never use it in the callback function and no-unused-vars does not like that. Replacing res with () or disabling no-unused-vars should fix this.

    • @PenStab
      @PenStab 4 роки тому

      You can also use res in the filter method by replacing the arguments to the filter method with ( res.data.id !== id ). Now you're checking the id of the todo that is returned from making the call to jsonplaceholder.

  • @MikeNugget
    @MikeNugget 5 років тому +2

    Global installation requires admin permissions. You can install Vue CLI locally by removing global attribute `npm i @vue/cli` and then run `npx vue create test` to avoid running it from the root.

  • @aliazizi7007
    @aliazizi7007 6 років тому +3

    please more videos about vue js and laravel ........yoou are so goooooood at teaching laravel plzzzzz

  • @amit26315
    @amit26315 4 роки тому

    Hi Brad,
    I have seen many of your previous videos, and i have learned perfectly with vuejs-cli.
    I have worked 3 years in Angular2+, and now i am switching to Vuejs.
    I think VueJS is mixture of Angular and React.
    Thanks and be there for more videos like this.

  • @mariany4691
    @mariany4691 5 років тому +5

    I hate to be that guy, but I really find this tutorial hard to follow. I think it's a bit too confusing with how the naming of things went. It really made it hard to really understand what was happening for me and how we're supposed to piece components.
    EDIT: Like with how we have a file called Todos TodoItem then theres a todo prop and a todo-item class.

    • @arcooke
      @arcooke 5 років тому +2

      I actually had the same issue. Too many things with the word todo, it made it confusing to show what was linking up to what

  • @RameenFallschirmjager
    @RameenFallschirmjager 4 роки тому

    Brad Traversy, is the best instructor ever, period. He's a national treasure!

  • @createlobo
    @createlobo 5 років тому +70

    I'm sorry but naming literally everything "todo" is not how one should teach a framework. Variable names need to be descriptive.

    • @kurzninja
      @kurzninja 5 років тому +14

      This does make things a bit confusing because it's hard to understand how different variables are referencing each other and what exactly is pointing to what.

    • @douglashoffmann1929
      @douglashoffmann1929 5 років тому +1

      I think thats the right way, because the name is on the convention that we use in our day. If your dont get used to it, just try to make a project naming every thing "button-add-todo-emitter-son" "button-add-todo-emitter-final"

    • @zacharytelschow4088
      @zacharytelschow4088 5 років тому +3

      If you think you can create better free material, help yourself. Brad does a great job explaining the basics and showing how the pieces tie together. Extremely nit picky feedback.

    • @vommir.
      @vommir. 5 років тому +1

      Yeah quite confusing, nonetheless awesome tutorial.

    • @samfeighery1224
      @samfeighery1224 5 років тому

      There is nothing from stopping you from naming your own variables and it is a crash course after all, Keep up the great work Brad!

  • @jsnelson_
    @jsnelson_ 4 роки тому

    Great course! Have not used Vue in a while but just got a new job which uses Vue and this was a great refresher! Keep up the good work man

  • @jashanbansal2613
    @jashanbansal2613 6 років тому +30

    Brad is Awesome!

  • @aliizzetmetin6382
    @aliizzetmetin6382 4 роки тому +5

    Vue definitely seems to be easier compared to react

  • @dc37wwe2kmods
    @dc37wwe2kmods 4 роки тому +1

    For preventing submits on forms use:

  • @mikepecha3818
    @mikepecha3818 4 роки тому +11

    lets rename the MEVN stack to VENoM stack

  • @chriss6311
    @chriss6311 4 роки тому

    These videos teach the essentials of web development tools really well. Thank you. I usually code along with the videos instead of looking at the source on GitHub. There are a couple of things I usually modify when coding along. (1) I'm a fan of longer, more descriptive variable names. They usually help me better understandwhats going on rather than seeing "todo" or "todos" a lot of places. (2) I usually see a lot of divs that don't really wrap contents with purpose, they just kind of exist. In a component like AddTodo, it's ok to have just the form on its own in the template. Another example would be using v-for on a component. For example, in Todos, you can use v-for=todo in todos" when embedding the TodoItem component and also v-bind:todo="todo" to pass it as a prop. In general, I find the generated HTML content is much cleaner to look at if you can avoid using divs that don't need to be there.

  • @vladhusnullin1650
    @vladhusnullin1650 6 років тому +6

    Good job. Thanks.
    Please, use @submit.prevent="action" next time. Instead of calling e.preventDefault()

    • @napalm_exe
      @napalm_exe 5 років тому +1

      Why is this way better than the other?

    • @napalm_exe
      @napalm_exe 5 років тому

      @@DistantComputer Ohh okay I see, thank you!

    • @cgomes1607
      @cgomes1607 5 років тому

      ​@@DistantComputer In that case, you'll have to put it in every directive calling this method, right? If so e.preventDefault() seems better for encapsulation.

    • @cgomes1607
      @cgomes1607 5 років тому

      @@DistantComputer True

  • @metrodakiadam
    @metrodakiadam 4 роки тому

    Love how you simplify and make everything clear before diving in, thank you brad!

  • @ThePandaGuitar
    @ThePandaGuitar 5 років тому +3

    Todos all over the place, unfortunately. Might be good tutorial for a todo app, but very difficult to understand the gist of the framework.

    • @johnraymon7743
      @johnraymon7743 5 років тому

      Hey, I can understand where you may have gotten confused. However, if you follow real close, you should be able to differentiate the identifiers despite there being multiple plays on the word "Todo"

  • @brawndo8726
    @brawndo8726 6 років тому

    I've been falling in love with Vue over the last few weeks. Once the conventions click and you shake off all the React, you'll be loving life.

    • @ibrahemkhalil5924
      @ibrahemkhalil5924 5 років тому

      if i may ask
      what do you mean by shaking off react ?
      you had trouble learning it ?

  • @WinnerSingh
    @WinnerSingh 5 років тому +4

    Always todo list 😅

  • @ahmadfawzy8404
    @ahmadfawzy8404 4 роки тому

    This is one of the most simple organized course about Vue.js i have watched
    thanks a lot

  • @bojandurmic1
    @bojandurmic1 6 років тому

    When I see 500 thumbs up and 0 thumbs down, I feel so great as if it happened to me, because Brad, you really deserve it. You are a good teacher, overwhelming majority of your content is free and you are really a great guy. Keep doing this great work for the community and I wish you all the best in the years to come!

  • @michelmeier1837
    @michelmeier1837 5 років тому +1

    Awesome crash course video - you explained all the basics so well and happily not just on a helloWorld project but a real app! Great job, keep on the good work!

  • @randomguy5922
    @randomguy5922 4 роки тому

    Wonderful course, you made us to watch till end, you exactly knew how to proceed and what to cover in an 1 hour video.
    Thanks for such useful beginner crash course.

  • @maryb9504
    @maryb9504 5 років тому +2

    Thank you very much !! Thanks to your crash courses for React, Angular and Vue, i got an idea about their concepts and it made it clear for me to choose the one i feel more comfortable with !! 🙏🏻

  • @ThePazuzu
    @ThePazuzu 3 роки тому

    If you want the checkbox checked depending on the completion status of the item, add v-bind:checked="todo.completed" to your checkbox.

  • @charliesoandso
    @charliesoandso 5 років тому +1

    Just a friendly heads-up, for anyone having issues with the CLI in Jan 2020:
    There's an error when using the scaffolding tool alongside some older versions of Node, so make sure you're running at least 13.1 of Node if you find yourself getting a lovely, very verbose build failure message when trying to run the basic serve command as I did earlier this afternoon.

    • @lexiaontube
      @lexiaontube 4 роки тому

      yep , lots of errors and then suddenly works (";")

  • @lunatunsa
    @lunatunsa 4 роки тому

    Been through a few Vue.js tutorials and this has been the best.

  • @sajinsj
    @sajinsj 5 років тому

    Thanks for this quick crash course covering all the basic stuff. Its the first time I am watching one of your videos, but I'll definitely watch more.

  • @tayloraustin1026
    @tayloraustin1026 5 років тому

    For anyone wanting to know how to do a default completed of true and make the class styles/check sync together. Inside of TodoItem --> Remove the onchange method and just add