Тёмный

Vuex Crash Course | State Management 

Traversy Media
Подписаться 2,3 млн
Просмотров 400 тыс.
50% 1

In this video we will build an application using Vue.js with the Vuex state management library.
Check Out My Sponsor - Monday.com
go.thoughtleade...
Code:
github.com/bra...
💖 Become a Patron: Show support & get perks!
/ traversymedia
Vue.js Crash Course:
• Vue JS Crash Course (2...
Website & Udemy Courses:
traversymedia.com
Follow Traversy Media:
/ traversymedia
/ traversymedia
/ traversymedia

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

 

4 окт 2024

Поделиться:

Ссылка:

Скачать:

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

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 491   
@mixxamm
@mixxamm 5 лет назад
8:46 scaffold doesn't work anymore with the latest version of vetur, you should type 'vue' instead.
@LinkChenTW
@LinkChenTW 5 лет назад
Thanks for sharing this information. That's why I can't use "scaffold" now, and I even don't know this is not the default snippet.
@Spades340
@Spades340 5 лет назад
I got surprised this week with that too :(
@yonas8212
@yonas8212 5 лет назад
Thank you very much! I was wondering where did it go.
@synapps.filip.gorczynski
@synapps.filip.gorczynski 4 года назад
Actually there are some templates provided by VS Code plugins, so when you enter vbase and hit tab it should expand into whole section, similarly vdata for data () { return { ket: value } and I suppose many more.
@LucXX36
@LucXX36 4 года назад
This doesn't work for me anymore. Alternatively you can you "html", "js" and "css" to pass through Ventur the part of the component you need.
@TheCodeholic
@TheCodeholic 5 лет назад
It's not long time I discovered your channel and surprisingly all of the videos are REALLY valuable. ALL OF THEM...
@digitalturkistan1857
@digitalturkistan1857 Год назад
It's not long time I discovered your channel and surprisingly all of the videos are REALLY valuable. ALL OF THEM...
@Rahul-ym9uh
@Rahul-ym9uh 4 года назад
You've got a special talent for keeping this simple and to the point. Even the pasting in of CSS is an excellent idea. Keep up the good work, you've got my money!
@DMANCHILD1
@DMANCHILD1 5 лет назад
Lets Go!! Brad don't stop ever!! Thank you sir.
@centrumsaiyan7623
@centrumsaiyan7623 3 года назад
Thanks, i'm a working developer and this tutorial is industry standard. Learnt a lot.
@saurabh7199
@saurabh7199 5 лет назад
I recommended your channel to my friends who are interested in web development..
@TraversyMedia
@TraversyMedia 5 лет назад
Thank you :)
@saurabh7199
@saurabh7199 5 лет назад
@@TraversyMedia your welcome Brad. I hope you will continue to upload these great content videos in future.
@HimanshuPal-li7nj
@HimanshuPal-li7nj 5 лет назад
& I recommend it to anyone who is not even interested in web Technology .....
@PaoPaw098
@PaoPaw098 4 года назад
You can easily change the `$event` part in the filterTodos by this: Add/Replace this in FilterTodos.vue file 1. __ 2. __ _import { mapActions } from 'vuex';_ _export default {_ _name: "FilterTodos",_ _data() {_ _return {_ _limit:0_ _}_ _},_ _methods: {_ _...mapActions(['filterTodos']),_ _onChange() {_ _this.filterTodos(this.limit);_ _}_ _},_ _};_ __ Add/replace this in todos.js (module) file 1. In _actions_ add this instead _async filterTodos({ commit }, limit) {_ _const response = await axios.get(`__jsonplaceholder.typicode.com/posts?_limit=${limit}`)__;_ _commit('filteredTodos', response.data);_ _}_ 2. In _mutations_ add this instead _filteredTodos: (state, todos) => state.todos = todos_
@mrrolandlawrence
@mrrolandlawrence 5 лет назад
im a new convert to Vue. React was driving me nuts (jsx) and when i looked at Angular, Vue just looked better in every way. Thanks for these tutorials.
@Arabian_Abomination
@Arabian_Abomination 3 года назад
I 100% agree
@moonkey45
@moonkey45 4 года назад
If you want to use mapGetters like he does in 17:26 you now have to add the spread operator pointpointpoint infront of it -> *...mapGetters(['allTodos'])*
@KehindeOrilogbon
@KehindeOrilogbon 5 лет назад
Brad is a mind reader... Just opened vuex docs yesterday and still on it, then he uploads this video :D. Thanks Brad
@harbilito4910
@harbilito4910 5 лет назад
47:30 , you could just type $event.target.value in the @change method in FilterTodos.vue
@kyrierevival3658
@kyrierevival3658 5 лет назад
also use event target value in todos.js?
@benjaminwaye6477
@benjaminwaye6477 4 года назад
​@@kyrierevival3658 I boiled it down to const limit = parseInt(e.target.value); but I notice there are more concise options
@adityakunhare
@adityakunhare 4 года назад
None of it is working, I am getting event.target is undefined in the todos.js (module) on console.log
@izzatullokanoatov370
@izzatullokanoatov370 5 лет назад
I don't know , dude. Should I stand up or sit down for taking off my hat and say "THANK YOU, bro. That was mind blowing tutorial." . Good luck , bro.
@storyden5
@storyden5 5 лет назад
Sir I love your Videos, but Have it in mind that the next generations won't forget a Hero like you..
@cll1out
@cll1out 5 лет назад
i just got done watching your vue.js crash course you updated back in January. You said you were gonna do this video "in a couple months." This posted in March. Love how spot-on you were with actually delivering on that promise. Good work sir!
@jasonjjavier6693
@jasonjjavier6693 5 лет назад
Your Crash Course is great, I have watched it since I'm in first year college and now I'm in an industry. Great help! Thank you.
@christianm6268
@christianm6268 4 года назад
wow thats a very nice of u jason. good to know
@allandacasin9041
@allandacasin9041 4 года назад
Life should be simple or minimal. I'm moving now to Vue from React.
@maskman4821
@maskman4821 4 года назад
awesome !!!
@xenon4602
@xenon4602 4 года назад
yeah IMO React is trash
@i-am-learning-life
@i-am-learning-life 4 года назад
Same here 🤣🤣
@romankocherezhchenko34
@romankocherezhchenko34 3 года назад
I have no idea why people still use React, when Vue, Svelte and other awesome framworks exist, idk
@romankocherezhchenko34
@romankocherezhchenko34 3 года назад
@@asanokatana Even junior can rebuild React app to Vue, but Vue to React don't.
@LucXX36
@LucXX36 4 года назад
At 47:15 you can just use something like "const limit = document.getElementById('id_name_of_select_element').value;" to get the value of the element. Don't forget to give your element the id you passed into this const variable
@devonmcdonald8924
@devonmcdonald8924 Год назад
Or just e.target.value works fine
@SamatTolkunbekov
@SamatTolkunbekov Год назад
Man this is gold, keep recording new lessons. Explanation, visual are on point, and most importantly it is brief. Subscribed and added to watch list on the second video.
@jonathanvanhoof9976
@jonathanvanhoof9976 5 лет назад
Thanks Brad. I'm learning Vue and this is really helpful. Also what I like is you don't speak / code too fast so that I can code while you speak.
@sweetberries4611
@sweetberries4611 5 лет назад
Literally stumbled upon this problem in my project, glad to find vuex
@petarstoyanov8976
@petarstoyanov8976 5 лет назад
Thanks, Brad! That really helped me understand faster how to use Vuex. It's simple and elegant. So easy once you get the hang of it. Keep up to awesome work!
@cyphen21
@cyphen21 5 лет назад
Subscribed to this channel like 8 months ago. Dont regret it at all.
@rakibulhasan8431
@rakibulhasan8431 4 года назад
your tutorials help me a lot for my first job as a software engineer. I'm grateful to Traversy media
@andrewkiminhwan
@andrewkiminhwan 5 лет назад
no one else is uploading consistently like brad on youtube. the absolute GOAT
@PhonePhaan
@PhonePhaan 3 года назад
really good tutorial, I was just brushing my vuex skills, Quick note: - instead of using event for filter you can use local data(state) and on change on select makes it easier
@johnnya1717
@johnnya1717 3 года назад
you're the only one who describes things clear. thank you
@interpulse
@interpulse 5 лет назад
You are the best teacher I've come across... Thanks for keeping it real. Respect
@Indialoves1
@Indialoves1 4 года назад
Brad, I am not only learning new things from you but also the coding structure you do is very clear and easy to understand.
@ebrahimmohammadi5489
@ebrahimmohammadi5489 4 года назад
It is one of the shortest and best videos to learn using Vuex in your projects, Thanks Brad and thanks Traversy Media
@TheBaltLT
@TheBaltLT 3 года назад
Much appreciated. Thank you for the quality and no annoying selfies. Best of luck.
@mr.webdev3700
@mr.webdev3700 5 лет назад
Thank you for providing so much value to the community!!! 👍👍👍👍👍👍👍👍👍👍👍👍👍👍
@TraversyMedia
@TraversyMedia 5 лет назад
You're very welcome :)
@microman99
@microman99 2 года назад
For those who encountered TypeError: Cannot read properties of undefined (reading 'use') -- Remove the line Vue.use(Vuex) in index.js will do. It took me hours to figure it out :")
@benpohl7186
@benpohl7186 5 лет назад
Our team is switching to Vue and this tutorial has been super helpful for me. Thank you so much!
@steps0x029a
@steps0x029a 4 года назад
Thank you so much! After watching the Vue Crash Course and this one, I immediately became a patron. Love your content!
@colinmignot6309
@colinmignot6309 5 лет назад
Thank you for being soooo generous. I have 2 days of programming experience haha and your channel is really inspiring me to work learn work learn work learn.
@centrumsaiyan7623
@centrumsaiyan7623 3 года назад
You must be a godly programmer at 2021.
@oz5277
@oz5277 2 года назад
for vue3 index.js: import Vuex from 'vuex'; import todos from './modules/todos'; // Create store export default new Vuex.Store({ modules: { todos, }, }); main.js: import { createApp } from 'vue'; import App from './App.vue'; import store from './store'; const app = createApp(App); app.use(store); app.mount('#app');
@comunicloud30
@comunicloud30 2 года назад
Thankyou Bro!!!!!!!!!!!!!!!!
@jehdiaizon
@jehdiaizon 2 года назад
thank you! this worked when 18:59 wasn't working and the error I was getting was error 'axios' is defined but never used no-unused-vars
@riidom
@riidom 2 года назад
uff I was going crazy on this thanks :D
@MuhammadRizkyEkaArlin
@MuhammadRizkyEkaArlin 5 лет назад
These crash courses are absolute miracles!!! Enough to get you started without leaving a confusion :D
@pixikraft9617
@pixikraft9617 5 лет назад
Thank you Brad. We are so so lucky to have you and i wish you success in all your projects because you deserve it.
@cajogos
@cajogos 4 года назад
Can always count on you to have a tutorial for things I need to quickly learn. I hope you don't mind I listen to your videos on 1.75x speed! You still sound awesome! I just lack time these days... It's not you... it's me.
@kamalhm-dev
@kamalhm-dev 5 лет назад
nuxt js next please!
@nvjrane
@nvjrane 4 года назад
This is the best video ever for learning VUEX in such a short time. Thanks a lot! Keep going!
@railroadandindustrialsky-wv8ns
Clear and concise walkthrough. You got me a job Brad. Thanks.
@overnightmares
@overnightmares 5 лет назад
Hi Brad, @48:00 why didn't you just use e.target.value ?
@jestinjoshi
@jestinjoshi 5 лет назад
No one's perfect
@derekgilbert1222
@derekgilbert1222 5 лет назад
I thought the same thing lol
@mateusavilaisidoro8305
@mateusavilaisidoro8305 5 лет назад
why he didn't use v-model?
@SebastianPerezG
@SebastianPerezG 5 лет назад
I'm just starting with vuex , this tutorial comes very handy !!! , i like the way that you explain man.
@HostDotPromo
@HostDotPromo 5 лет назад
Thanks, this helped clarify a few things for me. State management can be confusingly awesome.
@timbass9822
@timbass9822 5 лет назад
This was a good course Brad, but I think you made a mistake to show only using ...mapActions and ... mapGetters when writing Vuex code, as it is easier (and cleaner in many cases) to use this.$store.dispatch() and this.$store.commit() in components versus overly complicating things trying to be elegant using the ...map feature of Vuex when you can just use the global. Thanks for the good work!
@petersutton1609
@petersutton1609 4 года назад
Thanks Brad, was pulling hair after moving project to SPA with vue-router, this is the way to go!! :)
@mehtabahmed6092
@mehtabahmed6092 2 года назад
Thank you so much, you really made my life essay as I needed it in my thesis. Most important the comparsion with Redux was very useful as I knew it already.
@melrok1
@melrok1 3 года назад
this channel is guaranteed to be a subscription. Keep going and I wish you a lot of success.
@PB72UK
@PB72UK 5 лет назад
Great timing , just learning vuex myself :) so this should be very helpful, will we be seeing a nuxt crash course soon? Hope so!
@yeorinim2sida
@yeorinim2sida 4 года назад
8:46 "scafold(tab)" changed to "vue(tab)"
@damionatcodememory137
@damionatcodememory137 5 лет назад
Brad this tutorial was so clear and informative! Keep up the excellent work!
@steliosvoskos9610
@steliosvoskos9610 4 года назад
Thanks for sharing such high quality material for free. Excellent course about Vue and Vuex - I am starting a new role on Monday and those courses helped a lot.
@spongechameleon6940
@spongechameleon6940 4 года назад
Wow man, your stuff has always been great but this video in particular is really a whole new level. I learned way more from this than I thought I was going to. Thank you man, hope you're healthy and vibing in quarantine
@dulerong5
@dulerong5 4 года назад
Thank you so much Brad, your content is one of the most educational content on RU-vid, thank you.
@RawCoding
@RawCoding 5 лет назад
Great to see sucha massive tutorial dedicated solely to vuex. Well done
@acollierr17
@acollierr17 5 лет назад
Thank you so much for this video and in general what you do! For a while, I have been quite confused about state management. But my confidence has increased after watching this video. Time to implement and build a foundation from this video for my own site. Again, thank you!
@nuradiltursun6298
@nuradiltursun6298 4 года назад
jsut complete right now,step by step......thank you man
@virginielaborde9440
@virginielaborde9440 3 года назад
great course! quick, detailled & helpful, even if you never worked with state management
@collinsikotun1436
@collinsikotun1436 9 месяцев назад
Just really need to thank you cos you make things seem super easy, Kudos
@gaos94
@gaos94 5 лет назад
Thanks Brad! I got interested in web development thanks to you, I currently have 2 years working mostly on React, don't love Vue (don't dislike it either) but is good to know other ways to do the same thing.
@lerouxvermeulen4403
@lerouxvermeulen4403 2 года назад
Damn dude, what a lifesaver! You are the best.
@kshirodpatel
@kshirodpatel 5 лет назад
Brad love you man. The way you describe those stuffs it looks like wow how easy was that.
@nerrdii
@nerrdii 5 лет назад
Some suggestions... 1. You can use e.target.value when filtering 2. When updating, you can use a patch request and just pass in completed in the request body, and call the update todo action directly in the double click listener Great video as always!
@DarknessDescend
@DarknessDescend 3 года назад
Just like aways, I've learned a lot here! Thank you, dude!
@AvenalSzarosiwy
@AvenalSzarosiwy 5 лет назад
Hoooly... i just watched vue crash course and i thought it would be cool if you could do vuex course. You are a beast, Brad!
@raistlinmajere2257
@raistlinmajere2257 5 лет назад
Are you going to do a Vue.js Udemy course? If you do sign me up.
@speaktothepoint2108
@speaktothepoint2108 5 лет назад
Edison didn’t sleep 8 hours per day because, he didn’t ask internet for an advice. Hard work has no substitute. Thanks Brad.
@divyavishwakarma2002
@divyavishwakarma2002 3 года назад
You could've also filtered the todos by emitting an event from the child component and passing range from there to the parent component. I did it this way and it doesn't even require you to make a new request to the server.
@ljka
@ljka 4 года назад
Idk why but i always dance whenever i hear your bg intro HAHAHA
@chenqu773
@chenqu773 3 года назад
Nice tutorial! I am using vue/cli 4.5.13 and there are some incompatibility issues. For new version of vue/cli, it's better to select vuex directly from the vue project creation wizard, which will setup the vuex environment correctly for you.
@yousifalfalahy
@yousifalfalahy 2 года назад
thanks , u helped me out
@maximmaximov4772
@maximmaximov4772 4 года назад
finaly i've understood vuex ... thank you ...
@korndev6862
@korndev6862 5 лет назад
this crash course is very nice, i so understand everything about vuex. thank you very much sir.
@adrianoalves-qripto
@adrianoalves-qripto 5 лет назад
Thank you very much Brad for your passion and knowledge sharing. Greetings from Brazil Vuejs Community!
@tepchiva8342
@tepchiva8342 3 года назад
I recommended your channel to my friends who are interested in web development, I'm so thank you for good video share 💖💖💖
@IngPedroAraujo
@IngPedroAraujo 5 лет назад
This was a great video tutorial; It helps me clarify some concepts about Vuex. Obviously, this is not for a beginner. Great job! Thank you for sharing your knowledge; I wish you success in everything you do. Thank you
@AdnanAbbasi_LXXVIII
@AdnanAbbasi_LXXVIII 3 года назад
Excellent video again, I so much like following your videos, explained in very detail and thorough, I like the fact that you make a mistake and then fix it in front of us, everything is so natural :-)
@benjaminwaye6477
@benjaminwaye6477 4 года назад
Excellent tutorial! I noticed that removing some await(s) fixed the timing issue
@PatrickSierak
@PatrickSierak 4 года назад
In between the grid spaces of todos it is actually an optical illusion. You see grey dots between the spaces of the todos you are not looking at 35:36
@can9113
@can9113 5 лет назад
Amazing. Thanks to you I understood all the topics about Vuex.
@arnoldgamarra8425
@arnoldgamarra8425 4 года назад
Hi from Peru, thanks for sharing this awesome course about VUEJS
@brunogonzales7905
@brunogonzales7905 4 года назад
48:24 Why don't you just put a v-model on the select, assign it to a variable limit and then add an onChange and call filterTodos from there?
@EdwardGranville
@EdwardGranville 4 года назад
Sir, you seriously rock! Very well explained in a relaxed and clear way.
@gillfromamritsar
@gillfromamritsar 5 лет назад
you are doing an awesome work!, I have recommended your channel to lot of friends to learn and move forward in career.
@dandyooo
@dandyooo 4 года назад
Thanks for using REST API. Other tutorials are like using manual hardcoded datas which are not actually the best idea for this kind of tutorial.
@michaelkendagor4322
@michaelkendagor4322 3 года назад
This has been life changing to me .. thanks man.. God bless
@alvinkariuki236
@alvinkariuki236 4 года назад
this tutorial is just golden, thank you so much
@BenHayat
@BenHayat 5 лет назад
Hi Brad; I'd like to make a suggestions: Since Udemy doesn't have a feature for student to follow an instructor (Like pluralsight has), where when an instructor publishes a new course all the followers get email of the new course. Unless I've missed it, I can't find it on Udemy. My suggestion is, when you have a NEW course on Udemy, create an intro video here (2 minutes) to describe the course and you get RU-vid to notify 675,000 subscribers for you. This way if I see the course that fits me, I go an buy it. In the intro you can offer discount if you want. In fact you should tell Udemy to offer feature that students can follow instructor. ..Ben
@ShahidHussain-iz1px
@ShahidHussain-iz1px 3 года назад
It would be great if you can create a video with some example of routing and populating component on the basis of last state
@CODINGISEASY
@CODINGISEASY 5 лет назад
Another fantastic tutorial! Thanks brad!
@fernandobravodiaz3972
@fernandobravodiaz3972 3 года назад
A nice tutorial. Simple, concise and well explained.
@Cpt_Chirp
@Cpt_Chirp 5 лет назад
fantastic tutorial. perfect speed and everything is super clear.
@alecprologg
@alecprologg 3 года назад
So clear and concise, as always ! Thanks a lot Brad !
@yohanaatelo7610
@yohanaatelo7610 5 лет назад
u are master and creative great lesson and easy to understand thank u Brad
@bouhannacheabdallah
@bouhannacheabdallah 4 года назад
The number of times you said todos in this video is bigger than the number of seconds in it hhhh thanks ur very good teacher brad
@kiambojyms2196
@kiambojyms2196 2 года назад
Thanks. It has really helped me. I really like your videos.
@aram5642
@aram5642 3 года назад
So used to immutable array operations in ngrx that when I saw unshift or splice my eyeballs went out of orbits ;-)
@joseraimundofernandesfilho7570
Hello Brad. I really enjoyed your videos. May I ask if you ll do a Nuxt Crash Course?
@EricLansher786
@EricLansher786 4 года назад
Your content is amazing, Simple and very effective. Keep it up.
@aimdam1528
@aimdam1528 4 года назад
Still Rocks!, just amazing .. Support this man!
Далее
React Native Crash Course
51:28
Просмотров 695 тыс.
Vue JS Crash Course
1:50:52
Просмотров 1,3 млн
这位大哥以后恐怕都不敢再插队了吧…
00:16
Learn Vuex in 30 MINUTES! (Vue JS 3)
32:12
Просмотров 125 тыс.
Axios Crash Course | HTTP Library
42:20
Просмотров 369 тыс.
Vue.js: The Documentary
34:45
Просмотров 1,5 млн
Node.js Crash Course
1:30:08
Просмотров 1,6 млн
Angular Crash Course (2019)
1:24:09
Просмотров 969 тыс.
Express JS Crash Course
1:14:01
Просмотров 966 тыс.
The Difference Between Vue and React
10:27
Просмотров 38 тыс.
Express Crash Course
1:46:11
Просмотров 92 тыс.
Vue.js 2.0 In 60 Minutes
1:01:47
Просмотров 645 тыс.
这位大哥以后恐怕都不敢再插队了吧…
00:16