Тёмный

Vue JS 3 Tutorial for Beginners #5 - The Vue CLI & Bigger Projects (part 2) 

Net Ninja
Подписаться 1,5 млн
Просмотров 200 тыс.
50% 1

In this Vue 3 tutorial we'll dive deeper into making larger Vue.js projects with the Vue CLI - including how to pass data (props) between components, how to emit custom events, how to work with slots & how to use Teleport - a brand new Vue 3 feature.
--- Timestamps ---
0:00 - Scoped & global CSS
6:15 - Props
17:29 - Emitting custom events
23:05 - Click event modifiers
26:51 - Slots
35:51 - Challenge: creating another modal
40:08 - Using Teleport
🐱‍💻 🐱‍💻 BUY THE FULL 20-hr COURSE ON UDEMY:
www.thenetninja.co.uk/udemy/v...
🐱‍💻 🐱‍💻 Course Files:
+ github.com/iamshaunjp/Vue-3-F...
🐱‍👤🐱‍👤 JOIN THE GANG -
/ @netninja
🐱‍💻 🐱‍💻 My Udemy Courses:
+ Modern JavaScript - www.thenetninja.co.uk/udemy/m...
+ Vue JS & Firebase - www.thenetninja.co.uk/udemy/v...
+ D3.js & Firebase - www.thenetninja.co.uk/udemy/d...
🐱‍💻 🐱‍💻 Helpful Links:
+ HTML & CSS Course - • HTML & CSS Crash Cours...
+ Get VS Code - code.visualstudio.com/
🐱‍💻 🐱‍💻 Social Links:
Facebook - / thenetninjauk
Twitter - / thenetninjauk
Instagram - / thenetninja

Опубликовано:

 

31 май 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 141   
@thewildhealer541
@thewildhealer541 3 года назад
Definitely the best Vue 3 JS tutorials ever uploaded on RU-vid. Thank you so much dude, so many questions of mine have been answered so far.
@pablobricenocordova4747
@pablobricenocordova4747 3 года назад
x2
@Mohammed-rx6ok
@Mohammed-rx6ok 2 года назад
+3
@yasirtahirkheli74
@yasirtahirkheli74 2 года назад
Agreed..He is a true Ninja
@thewildhealer541
@thewildhealer541 2 года назад
Update: He saved me and my group during a huge project we had to do in class where my teacher didn't do his job and we had little time to learn. Still thankful for this guide and when I need to learn anything new I check if Net Ninja got a tutorial for it. PS we got full score on our project.
@KyleBondo
@KyleBondo 2 года назад
I had a problem with slots. The anchor tag refused to style. I found a reference that suggest using a "deep selector" that would change the CSS in the Modal.vue style to: .modal .actions >>> a { [CSS Styles] } THAT WORKED! But WHY did that work?
@jeremybrews2521
@jeremybrews2521 7 месяцев назад
I'll have to dig into the "deep selector". Thanks for the help
@fowl7413
@fowl7413 3 года назад
After browsing dozens of courses on Vue, I found yours and man, you blew my mind! Extremely easy to understand, cover all the basics for newbies plus covering the required previous knowledge too! Hat off mate, you are a champ!
@ZoyaLoenko
@ZoyaLoenko 2 года назад
Ok, I must say that I tried two other Vue Tutorials on YT, and this one is absolutely the best. Finally I can really understand how props and $emit work. Not only memorise the syntax, but see the logic there. You are an amazing educator! Thank you for your work! Greetings from Russia
@straydogstrut115
@straydogstrut115 3 года назад
Fantastic tutorials! Really clearly explained and useful examples. Thank you for all the time and energy you've put into this. I'm looking forward to the rest of the course.
@argamangez
@argamangez 2 года назад
Incredible course, I'm blown away. Paid for so many React JS courses that I really didn't like so I tried going for a different framework and yours is just the best I've seen
@LinuxForLife
@LinuxForLife 3 года назад
Another masterpiece of explanations. Congrats and Thank you!
@gradientO
@gradientO 3 года назад
Man you're doing great. I need to buy your course to support you
@NetNinja
@NetNinja 3 года назад
Thank you :)
@ulvihmdli688
@ulvihmdli688 3 года назад
Hi did you buy it?
@jad.k.haddad
@jad.k.haddad 2 года назад
dude your tutorials must be officially adopted by the devs. It's impossible to not understand your explanation. Best tutorials creator ever
@ZakirHussain-mz2iz
@ZakirHussain-mz2iz 3 года назад
Thank You Shaun! I have to say that, I learned Vue mostly from your channel by watching the previous version 2 videos.
@joshuankrumah-buadu9341
@joshuankrumah-buadu9341 2 года назад
Anytime I want to learn anything web i just head straight to your channel and I'm sorted. You doing well, Keep it up. Much love.
@estelat8133
@estelat8133 3 года назад
ty ty for making this course - absolutely the easiest to understand that I've found 🙌🏽
@mullla1ya
@mullla1ya 3 года назад
I have no words. You're really the best. These are the best tutorials I've ever seen. Not just about Vue. I am talking about ANY RU-vid TUTORIALS! Shaun you're the champion. Aren't you a some sort of teacher or professor? You're made for teaching!
@wovasteengova
@wovasteengova 3 года назад
I agree..
@ahmadalharbi9097
@ahmadalharbi9097 2 года назад
Shaun has made me love JavaScript and its frameworks.. after finishing this series definitely I'm gonna buy the whole course, Thank you Shaun
@almogidisis274
@almogidisis274 2 года назад
I was trying to wrap my head around React HOC for so long. Now days I'm learning Vue for a new role so I got to Shaun's tutorial. He then suddenly started talking on an unfamiliar term for me, "slots"... I mean, it just came to me, such an incredible "Ahhhhhhhhhhh" moment - I finally found a convenient way to think of HOC, Thank you man!
@cristiandumitriu1245
@cristiandumitriu1245 2 года назад
This was exceptional. I understood slots and events finally. Thank you.
@ramonpaolomaran2253
@ramonpaolomaran2253 3 года назад
Nice, this is incredible. Love you and love your channel from Brazilll
@DanielTorres-gd2uf
@DanielTorres-gd2uf Год назад
This is a great tutorial. I got to 23:04 and was thinking about this exact thing. Nailed it!
@myotoe2154
@myotoe2154 9 месяцев назад
You are the best. I really love your tutorials. Thank you so much for free of charge.
@bobich1244
@bobich1244 3 года назад
A great thanks, so well explained and good examples to apply quickly. Thank you !
@yesfishyy
@yesfishyy Год назад
I love how I leveling up day by day
@MartinMarchev
@MartinMarchev 3 года назад
Fantastic series! Massive thanks!
@christersin7934
@christersin7934 3 года назад
This recently since i start to use vue to do smthg cool. but i get many logical trouble error in vue, and now this series is going to help me solved these~~ Thank you very much sir, it's easy to understand on your video good speech easy to get the point and organized topic. Liked it. Hope soon have many different skill, different framework introduce to the beginner.
@darshandivte7363
@darshandivte7363 2 года назад
very good videos to learn Vue js from scratch.. Thnx for creating such a playlist
@matthiaskolley1048
@matthiaskolley1048 3 года назад
Thank you very much for these great explanations. I got one question... Is the preferred way: using that "emit-function" or can I just use a function from "props"?
@mattiaorfano
@mattiaorfano Год назад
I felt the panic and absolute disappointment at 26:30 when the change didn't work as expected :-) we all went through that man. Btw, great course!! I am an experienced backend developer and within few hours I learned Vue.js. Thank you so much. Matt
@NetNinja
@NetNinja Год назад
That's awesome, thanks for watching Matt :)
@houssemderouich4910
@houssemderouich4910 3 года назад
You are the best teacher ever
@Gandobilis
@Gandobilis 9 месяцев назад
The challenges part is awesome, most of the tutorials are in lack of this feature.
@dandelion0331
@dandelion0331 2 года назад
clearly explained every single detail. no bullshit. good instructor.
@awaiskhalid4593
@awaiskhalid4593 3 года назад
bruh ur fking amazing. i've watched diff utubers but ur knowledge is next level
@Toni-nw1dk
@Toni-nw1dk 3 года назад
Thank you so much! I love your videos!
@EdelwaysMusic
@EdelwaysMusic Год назад
Can someone explain: in previous video (Basics part 2) when we send book item to the app.js during v-for we did not used props. We just put book without porps declaration. How does it works?
@henrycho5288
@henrycho5288 2 года назад
wow this is amazing tutorial, I want to see vue and firebase together in youtube. Thank you so much for this tutorial.
@elakObad
@elakObad Год назад
Loving this course so far
@NetNinja
@NetNinja Год назад
Awesome, thanks Oscar!
@push2me936
@push2me936 Год назад
Thanks a lot Shaun! Let's give it a wow! This is teaching on Champions League level!
@nielfollero8061
@nielfollero8061 3 года назад
There's a bug where the modal automatically shows without clicking the button when you use v-show inside the teleport tag instead of v-if. How do we combat this?
@uhyahaa8371
@uhyahaa8371 3 года назад
Oh boii... your tutorials are the best :)
@vincenzocristiano135
@vincenzocristiano135 Год назад
Best web dev tutorials on the internet as always!
@NetNinja
@NetNinja Год назад
Thanks Vincenzo :)
@learnsimple4592
@learnsimple4592 3 года назад
Making greatness Shaun. I have bought 2 of your udemy courses already. Please tell us when is the VueX 4 with Vue 3 tutorial coming
@NetNinja
@NetNinja 3 года назад
Thanks so much :). I'll probably do that very ealry next year!
@veedawg630
@veedawg630 2 года назад
amazing tutorial dude thanks a ton
@JJ-ot3ps
@JJ-ot3ps 2 года назад
I watched a few vue tutorials, this is def the best one! can you also upload more videos how vue can work with backend framework like django or larval? or even tailwind lol
@themoroccanpianist8953
@themoroccanpianist8953 2 года назад
Thanks sir ! but why would we want to place a modal or a popup at the bottom of the DOM tree, what is the purpose ?
@Smowling
@Smowling 6 месяцев назад
Great tutorial. Cant get enough of it.
@NetNinja
@NetNinja 6 месяцев назад
Awesome! thanks :)
@WanderGirl
@WanderGirl Год назад
Loving the Tutorials and so far the best explained tutorial I have found on vue. On question though regarding slots. Why not use a component that has the template but a slot. like we can also have a Links component instead of a links Slot? Just trying to understand the difference between the two.
@saadsheikh27
@saadsheikh27 2 года назад
JS + shaun = best combo
@huzaifaadil2128
@huzaifaadil2128 9 месяцев назад
Sir, why are you using v-if here to close the modal even the v-show renders fast?
@chenqu773
@chenqu773 3 года назад
This is the BEST one !
@chpasta
@chpasta 9 месяцев назад
Hi there! Why both modals couldn't remain with the inital styles (for exemple: background: crImson). Thanks
@davidleda2324
@davidleda2324 3 года назад
Hi Shaun. Great tutorial. One quick question: Considering that toggleModal() is a method, couldn't we pass as a parameter inside the brackets which of the two modals we want to toggle instead of having two different methods one for each modal? For instance: open modal one open modal two
@samlaf92
@samlaf92 2 года назад
I don't think this works, because this will pass the value of showModalOne and showModalTwo, as opposed to a reference to them. I solved it by doing the following, but I'm thinking there must be a better way to do this... toggleModal(modal) { this.$data[modal] = !this.$data[modal]; } and then calling it like Show Modal 1 Show Modal 2
@lintingwei
@lintingwei Год назад
Too good this has to be in the official doc!!
@AA-jb5cs
@AA-jb5cs 3 года назад
Hi, I have a question please, couldn't we use @click="toggleModal" directly in the Modal tag instead of creating a custom event. I know you might not have time to answer my question, but I thought it won't hurt me if I try Edit: I've tested what I've asked and it works fine, I guess you used emit to show us it's use. Thanks a lot for these great videos btw, I'm really learning a lot, best tutor ever!
@boxtrainer
@boxtrainer Год назад
QUESTION: sometimes you use 'text' sometimes "text" I recognize in the I can use both as long as I am using one style in the current tag . where is it important to use specific " or ' could someone give a useful hint?
@samhitavetcha322
@samhitavetcha322 4 месяца назад
Can we send the toggleModal function as props and use it instead of custom events?
@javhaasuhochir8126
@javhaasuhochir8126 Год назад
slots are amazing
@javierlizarazu1297
@javierlizarazu1297 3 года назад
when using slots the css on Modal.vue won't apply to the tags h1, p and a... does anyone have the same bug?
@Doumstyle
@Doumstyle 2 года назад
yep same here, CSS do not apply! I'm going crazy trying to figure out why
@dennisbarnaja4173
@dennisbarnaja4173 2 года назад
It did. Check on the css at the bottom of Modal.vue example it says .modal.sale .actions a { color: white; } change that to blue or any color and see what happens
@NotesandPens-ro9wx
@NotesandPens-ro9wx Год назад
What is the necessity to use props? I meant why we or when we should use it? 11:40
@toipham3227
@toipham3227 2 года назад
thanks so much for a great video!
@exploreworldtogather
@exploreworldtogather 2 года назад
what a explination by you sir, i am so thankful to you. ALLAH bless you.
@alexanshuman2462
@alexanshuman2462 9 месяцев назад
🙌😍One of the best explanation, keep it up. 😀
@NetNinja
@NetNinja 9 месяцев назад
Thanks a lot 😊
@fadhilinjagi1090
@fadhilinjagi1090 2 года назад
Why would anyone dislike these great tutorials? Great videos. I'm learning a lot.
@starkgaming4758
@starkgaming4758 3 года назад
first view and thank u bruh for such amazing tuts!!
@ChrisChanSajelan
@ChrisChanSajelan 3 года назад
Thank you very much!
@thanakornmeesupprasert5179
@thanakornmeesupprasert5179 Год назад
I owe you a lot. Best teacher I've ever known. I will buy your courses and please let me know if you come to Bangkok.
@NetNinja
@NetNinja Год назад
Wow, thank you for the support Thanakorn :)
@thanakornmeesupprasert5179
@thanakornmeesupprasert5179 Год назад
@@NetNinja bought 2 courses just now.
@mohsenpiri4371
@mohsenpiri4371 2 года назад
hi, very good tutorial. thanks.
@mjuyg4rh8a
@mjuyg4rh8a 2 года назад
Esta serie de videos es espléndida.
@ayocs2
@ayocs2 3 года назад
I'm not getting the exact output as your @ 15:16 this got me the result but can't understand why....
@geniichen
@geniichen 3 года назад
Thank you Shaun, you did a great job. I do learn a lot from you tutorial and love it. I therefore joined your RU-vid member and going to buy your Udemy course. Would you consider to generate a course combining with Laravel and Vue(or React) (use Vue/React in Laravel project)?
@dashabulatova7628
@dashabulatova7628 3 года назад
Thank you very mutch!
@gurbanovsh
@gurbanovsh Год назад
Good Job!
@Foused87
@Foused87 3 года назад
Idea for next videos: React course like this!
@jimos9878
@jimos9878 7 месяцев назад
What if you want to pass on many data, therefore props, to a child component? We could add a property inside data () {} object which would be an object of many properties for the props we want to pass on? and we bind that object to the child component inside our parent one? so for example if we would have some user data we could do it like: data () { userData: { userId: "user1", password: "12345678" } and bind the userData property in the tag of our child component, like: ?? Or isn't this possible for some reason? I tried to do this and I think it didn't work, but I could not understand very good how the props, and all these in Vue, work, so I might had done it incorrectly in general at that point.
@anaselhakeam6077
@anaselhakeam6077 2 года назад
how to open the webpage of the vue app from vs vode?
@riazbacchus3962
@riazbacchus3962 2 года назад
dude, i love you
@harrysantoso6430
@harrysantoso6430 3 года назад
awesome sir..
@mohammadalhallaq3093
@mohammadalhallaq3093 3 года назад
thank you so much
@danielwatson6529
@danielwatson6529 2 года назад
I always have a good time with your tuts. however with this one Vue was so buggy. I would delete text etc from the app and it would still appear in the browser even tho id deleted it from the app 100%. No idea why it was so crazy with me. I followed instructions to optimise and ran the " npm build to optimise" and that worked - although I don't think im quite ready to understand the list folder yet, but I have seen you cover it on one of the firebase tutorials, so I hope everything comes together by the end 🤓
@furkangonulal1355
@furkangonulal1355 3 года назад
in teleport section, once i click the backdrop to close it , it just darkens and not closing dunno why , normally it works but once i add teleport tag it doesnt anymore lol why tho
@jamesdrysdale3711
@jamesdrysdale3711 3 года назад
This happened to me as well, and I'm not sure why. Did you manage to fix it? It'd be good to know what went wrong.
@luvsachdeva1520
@luvsachdeva1520 3 года назад
Your Course is awesome. What else is there apart from this in your Course on Udemy. Can you share links for your course? I need to purchase. Thanks. Again U r great
@pisanghangus2
@pisanghangus2 2 года назад
lovely
@nielfollero8061
@nielfollero8061 3 года назад
I'm getting a bunch of red underlines in App.vue even though the program runs perfectly fine without errors. It says it's related to eslint-plugin-vue
@00el04
@00el04 3 года назад
make sure not to download it when you create the app
@maialso6096
@maialso6096 3 года назад
I'm not sure why when I click on the button show modal two it doesn't work but its actually changing the other button function ...so when I click first the show modal button the first modal will show but if I click the show modal two then the show modal button modal two shows
@maialso6096
@maialso6096 3 года назад
oh okay so ... I defined it as Show by mistake T__T .........Thanks for the tutorials I really love this channel
@Erol_makes_stuff
@Erol_makes_stuff 6 месяцев назад
Thanks!
@NetNinja
@NetNinja 6 месяцев назад
Thanks for your support Erol, it means a lot :)
@J0hn1ee
@J0hn1ee 2 года назад
thanks
@darkmojojojo
@darkmojojojo Год назад
For anyone else running into it the server doesn't seem to always refresh properly after changes so hitting Ctrl-F5 to do a hard refresh seems to help.
@qamaria7454
@qamaria7454 Год назад
Resolve the refresh issue by closing the server and run again npm run server. I think the probleme come from Websocket
@SaleemVFX
@SaleemVFX 10 месяцев назад
my styles are not working after using the modals
@ridl27
@ridl27 3 года назад
ty.
@ambig1
@ambig1 Год назад
the unfortunate thing about this visual code studio theme is it is hard to know on which he tab is he in, you end up writing or modifying the code in different tab than intended
@bugrahandurukan4665
@bugrahandurukan4665 2 года назад
couldnt get the css going on the slots part
@oguzakankan518
@oguzakankan518 3 года назад
I know, I know you have no desire to answer this question but still, I want to ask you. Would you suggest/prefer to React or Vue?
@NetNinja
@NetNinja 3 года назад
Honestly depends on what I'm making, but I'm really enjoying Vue 3 using the compostion api at the minute. I preferred React to Vue 2 for most things though.
@kevinadrian2640
@kevinadrian2640 Год назад
you are still great
@user-tu4ij7pv2w
@user-tu4ij7pv2w 5 месяцев назад
This is good stuff! I was watching @ vuemastery but got stuck because they skipped some stuff. This is so well explained! I just wonder if working with vue cli is the best way to go.. And hopefullly i don't get stuck later. But till now it's the best! Can you please update the course files link? Can't find the files.. [edit] I just found them at lesson 19.. maybe good to add this ?
@cubedev4838
@cubedev4838 2 года назад
Please teach us angular also
@raz0229
@raz0229 3 года назад
Do you read all the official documentation before making these tutorials?
@00el04
@00el04 3 года назад
yeah i think he does, I'm going through the docs and its very similar :)
@Wilhelm_LAS
@Wilhelm_LAS Год назад
I looked yesterday. Its so familiar with docs.
@ulvihmdli688
@ulvihmdli688 3 года назад
Has anyone taken this course from udemy?
@eddykei6330
@eddykei6330 3 года назад
who tf could have disliked that
@dejangegic
@dejangegic 3 года назад
I was wondering the same thing
@saphalpoudyal262
@saphalpoudyal262 3 года назад
ayyyyyyy
@johnmoore4248
@johnmoore4248 3 года назад
People say Vue is easy to learn but for me it is far more complicating than React. Feel like learning new language than applying js. What do U think?
@ayocs2
@ayocs2 2 года назад
35:51
@zatinpandey
@zatinpandey Год назад
I can't find the files , 😭😭😭
@zatinpandey
@zatinpandey Год назад
Found it🥲