Vuex: A Deeper Look At Modules, Namespacing and More!

  Рет қаралды 27,006

Program With Erik

Program With Erik

Күн бұрын

Пікірлер: 50
@cinemaismywife
@cinemaismywife 3 жыл бұрын
Hi Nice Tutorial, this is good but when we are re using the component that uses same store will be a problem. I am not sure how can we re use components that use same modules. even though I declared state as a function that returns state i cannot reuse them . Can you tell me how to achieve that?
@indranilbanerjee6142
@indranilbanerjee6142 3 жыл бұрын
Great tutorial ❤️! I have a quick question i.e I have a project with vuex store. Now in that parent project I am using another custom child project as dependency. So, will the vuex store of parent project be accessible in child project component also? Is there anyway? Thank you
@lansolo1991
@lansolo1991 5 жыл бұрын
I have a question concerning your 'initStore' action at 03:30 : you use async/await to fetch your jokes.json file. before comitting to the state. In my own project (the first one), in the vuex store, I use : import Myjson from ‘@/myjson.json’ then it directly feeds the state just with a ‘state: Myjson’. Actually, I don’t see the point using async await according to the fact it doesn’t seems to trigger something as soon as jokes.json is fetched.. Great tutorials by the way as always!
@ProgramWithErik
@ProgramWithErik 5 жыл бұрын
lansolo1991 that’s a good one! Yes, you can directly import json that way, but I wanted to simulate the differences in using actions versus mutations. So just assume that the fetch was talking to a server instead
@wadday
@wadday 5 жыл бұрын
Your option is great for contents load locally like JSON file used. However like Eric said every data may not be hard coded, and majority we may fetch from some external or API source..
@murilolivorato1489
@murilolivorato1489 5 жыл бұрын
Hello my friend , wonderful tutorial . I have a question , I wold like to know if has any way to re use codes , or expand a class inside VUEX . I know that in VUE we have mixins , but I dont know if that it is possible to use in VUEX . I have many VUEX CRUD modules . for example POST_MODULE , POST_CATGEORY_MODULE , POST_USER_MODULE .... and All tff them has almost the same fuinctions , create() . delete() . update() , ..... How do you manage that to dont repeat the code ? Thanks
@bigonema9546
@bigonema9546 5 жыл бұрын
hello, i have seen your amazing videos. so, I'm trying to copy it, but there's an error. "[vuex] module namespace not found in mapGetters(): jokes/" Can i get a solution for this?
@Alex-Shohet
@Alex-Shohet 5 жыл бұрын
please tell me which extension highlights the body function so beautiful
@ProgramWithErik
@ProgramWithErik 5 жыл бұрын
I'm using Sarah Drasners Vuejs pack. marketplace.visualstudio.com/items?itemName=sdras.vue-vscode-extensionpack
@soklagenhet
@soklagenhet 4 жыл бұрын
Great tutorial man, every other tutorial out there regarding namespaced modules overcomplicates it, but you really nailed it.
@asim-gandu-phenchod
@asim-gandu-phenchod 3 жыл бұрын
I have read your "Vuejs in Action" book. It was really a great book. Thanks for creating such a nice book
@ProgramWithErik
@ProgramWithErik 3 жыл бұрын
Awesome thanks for checking it out!
@ProgramWithErik
@ProgramWithErik 5 жыл бұрын
Vuex modules. Love it, hate it? Tell me all about it!
@wadday
@wadday 5 жыл бұрын
Loved it..
@chetankharel4435
@chetankharel4435 5 жыл бұрын
i found easier to use vuex with vue than redux with react.
@newworld3844
@newworld3844 5 жыл бұрын
Hey Erik, do you think there will eventually be more Vue jobs. I live in Los Angeles and there are hardly any. And most of those jobs are at design firms using laravel on the backend.
@ProgramWithErik
@ProgramWithErik 5 жыл бұрын
Yes, I think it's slowly growing.
@jianjunxiao5779
@jianjunxiao5779 5 жыл бұрын
great job, could i have your raw code at github, thanks in advanced !
@johnnydriesen7575
@johnnydriesen7575 4 жыл бұрын
Watching this vid in June 2020, and it's still very accurate and helpful. Thanks for all your time and effort, Erik.
@ColinRichardson
@ColinRichardson 5 жыл бұрын
Strange way to find the latest id, seems a prime example of when to use array.reduce
@dvnarxx
@dvnarxx 4 жыл бұрын
Thanks, Erik! I've been looking for a simple, lean video that explains exactly that!
@cheukkie
@cheukkie 5 жыл бұрын
For those who can't get the initStore part working. I had the same. I changed it to this to make it work: Object.keys(modules).forEach(moduleName => { if (modules[moduleName].actions && modules[moduleName].actions.initStore) { store.dispatch(`${moduleName}/initStore`); } });
@ProgramWithErik
@ProgramWithErik 5 жыл бұрын
Thanks, weird you were having problems. I'll need to make an updated video
@netfan1587
@netfan1587 4 жыл бұрын
Thanks! Wish you write this also in typescript!
@tubun09
@tubun09 5 жыл бұрын
Thank you so much. your github is not updated with this video tho
@fenkraken
@fenkraken 5 жыл бұрын
Fantastic video, thank you, Erik! Wanted to add future request, since you are probably more experienced with Vue than most people. In Vuex there is such thing as "watch" (it's in API reference at vuex official site). I wonder if it's better solution than to have a watchers for getters since it's baked directly into store (in my mind it can be used with some kind of cool vuex store notifications app-wide). Can you make a video about it? Maybe how it's different (if so) when used with Nuxt too. I think it would be great topic to have a video on. Thanks for you work!
@ProgramWithErik
@ProgramWithErik 5 жыл бұрын
Good idea, I'll look into this!
@peoray
@peoray 5 жыл бұрын
Absolutely great tutorial. Learnt so much
@ProgramWithErik
@ProgramWithErik 5 жыл бұрын
Thanks!
@jacquesduplessis6175
@jacquesduplessis6175 5 жыл бұрын
Great vid, thanks man! I was just playing around with modules last night and I ran into some thing you highlighted in this vid.
@ProgramWithErik
@ProgramWithErik 5 жыл бұрын
Awesome!
@nitinuniyal8357
@nitinuniyal8357 5 жыл бұрын
I have seen a lot of your videos. They have really helped me in picking the concept very easily. As you have a lot of experience in software developer. Can you make a video on improving coding skill, to help us become a good programmer.
@ProgramWithErik
@ProgramWithErik 5 жыл бұрын
NITIN UNIYAL yes I will
@SebastianPerezG
@SebastianPerezG 5 жыл бұрын
I'm just making something with vuex vue and Laravel and for me this is video was very usefull. Next time maybe you can make a video about vuetifyjs v-data-table and server side pagination / search with Laravel.
@ProgramWithErik
@ProgramWithErik 5 жыл бұрын
My Laravel skills aren't so great, but this is a good idea :)
@SebastianPerezG
@SebastianPerezG 5 жыл бұрын
@@ProgramWithErik No problem man, i asked that because there are very few tuts about vuetify with real examples.
@heyyy4987
@heyyy4987 5 жыл бұрын
Do it some with mongo express vue and node (MEVN). Tanks
@SebastianPerezG
@SebastianPerezG 5 жыл бұрын
@@heyyy4987 That could work ...
@shuttereff3ct593
@shuttereff3ct593 3 жыл бұрын
Thanks, that's a great video!
@raccqa
@raccqa 5 жыл бұрын
Great video, Thanks Eric!
@Rjktcj456rjktcj
@Rjktcj456rjktcj 5 жыл бұрын
Amazing tutorial! Thank you very much for your work.
@hcivelek
@hcivelek 5 жыл бұрын
Thank you for the video. very clear.
@ProgramWithErik
@ProgramWithErik 5 жыл бұрын
You are welcome
@mahmudulhasan1360
@mahmudulhasan1360 5 жыл бұрын
Best one i ever seen
@ProgramWithErik
@ProgramWithErik 5 жыл бұрын
Awesome!
@mahmudulhasan1360
@mahmudulhasan1360 5 жыл бұрын
@@ProgramWithErik I've searched a lot but these videos make me complete.
@RenatoFontes
@RenatoFontes 4 жыл бұрын
thanks!
@heyyy4987
@heyyy4987 5 жыл бұрын
Fucking amazing. Tanks
Vuex Explained Visually by Adam Jahr
26:33
VueConf Toronto
Рет қаралды 18 М.
Vue.js Vuex Modules Don't Have To Be Boring...
19:39
Program With Erik
Рет қаралды 16 М.
Beat Ronaldo, Win $1,000,000
22:45
MrBeast
Рет қаралды 158 МЛН
Learn Vue.js (RU): Advanced Vuex - Modules & Plugins
21:49
Learn Programming Together
Рет қаралды 3,5 М.
Vuex Crash Course | State Management
1:01:19
Traversy Media
Рет қаралды 400 М.
STATE & STORE | VueJS & Vuex | Learning the Basics
15:27
Academind
Рет қаралды 224 М.
Top 10 Tips For New Vue.js Developers
16:16
Program With Erik
Рет қаралды 51 М.
Pinia Simplified
4:28
LearnVue
Рет қаралды 126 М.
Mastering Vue.js and Vuex
46:01
WeAreDevelopers
Рет қаралды 85 М.
Vuex: Intro Tutorial
5:24
Vue Mastery
Рет қаралды 86 М.
Creating a Better Vuex Experience | Tips by Example
15:00
Kaizen Codes
Рет қаралды 13 М.
You're Using Tailwind CSS The Wrong Way! A look at reuse.
8:01
Program With Erik
Рет қаралды 6 М.
#9 - modules & namespace | Vuex state management tutorial
17:05