LEARN VUEX IN 15 MINUTES (VUE.JS STATE MANAGEMENT) FOR 2020 // DAD JOKE GENERATOR APP -VUEX TUTORIAL

Поделиться
HTML-код
  • Опубликовано: 29 сен 2024

Комментарии • 147

  • @ProgramWithErik
    @ProgramWithErik  4 года назад +2

    🚨 Sign up to Linode using the code below and get a $20 credit!
    linode.com/programwitherik

    • @jairojake5042
      @jairojake5042 3 года назад

      pro trick : watch movies at InstaFlixxer. Been using it for watching loads of movies during the lockdown.

    • @brodieholden8045
      @brodieholden8045 3 года назад

      @Jairo Jake yea, have been watching on InstaFlixxer for years myself :D

    • @estebannicolas78
      @estebannicolas78 3 года назад

      @Jairo Jake Definitely, I've been using InstaFlixxer for months myself =)

    • @karterstanley7460
      @karterstanley7460 3 года назад

      @Jairo Jake Definitely, been watching on InstaFlixxer for since december myself :)

    • @dumpling6440
      @dumpling6440 2 года назад

      Hey, can you help me how to mounted mutation, I want to extract something and update state on page load , how would i do that.

  • @millikin2099
    @millikin2099 3 года назад +10

    Erik, what VS Code theme are you using? I love it.

    • @JoakimNystrom
      @JoakimNystrom 2 года назад +2

      It's syntwave ´84. Erik is featuring it here: ruclips.net/video/T_sL7SO4wMg/видео.html

  • @AdamRobertson
    @AdamRobertson 4 года назад +1

    IMHO you're using Getters wrong, I see this a lot. As the docs say 'Sometimes we may need to compute derived state based on store state', you don't need them to just return a store property, they are more like Vuex `computed` properties based on state. You can already access `this.$store.state.currentJoke` in your Component (or using the corresponding `MapState` helper) without needing a getter at all. The problem with the way you are using them is people end up thinking they need to create a getter for every store property, and you end up with loads of unnecessary getters just to access store props that are already exposed on the state.

  • @PaulSebastianM
    @PaulSebastianM 4 года назад +9

    I hate the extra layer of indirection with the Vuex map* helpers. I always like code to be obvious and simple. I honestly don't know why someone would mind using the full store accessing syntax when it is pure and simple and readable and you don't have to hunt down an extra layer of indirection to find out where that function your calling is coming from.

  • @IT-Entrepreneur
    @IT-Entrepreneur 4 года назад +40

    The most important Question: How did you get the glowing syntax highlight? Is this inclueded in your vs code theme or something else :D

    • @kaiparado
      @kaiparado 3 года назад +3

      ruclips.net/video/T_sL7SO4wMg/видео.html

    • @hellocheng7071
      @hellocheng7071 3 года назад +1

      Same question!!! The codes is so cool!

    • @IT-Entrepreneur
      @IT-Entrepreneur 3 года назад +8

      @@hellocheng7071 Found it: marketplace.visualstudio.com/items?itemName=RobbOwen.synthwave-vscode
      You then still need to enable Neon Dreams (Descriped in the theme readme)

  • @nikhilrw
    @nikhilrw 4 года назад +8

    The part where you explained mapGetters and mapActions and the fact that you could rename them, was insightful. Thanks!

  • @GTsurwa
    @GTsurwa 4 года назад +10

    What theme extension are you using?

    • @xurify
      @xurify 4 года назад +5

      ruclips.net/video/T_sL7SO4wMg/видео.html

  • @Chryst1anFRz
    @Chryst1anFRz 3 года назад +4

    Dude, this was so good! My team and I are learning VueX and this really helped.

  • @vitiok78
    @vitiok78 4 года назад +3

    You can simply use getters and actions after spreading mapGetters and MapActions by their names in template without wrapping them in objects

    • @ProgramWithErik
      @ProgramWithErik  4 года назад +1

      Victor Cozhuhari yeah I know, but I wrapped them in objects so I could change their names

  • @fauzi5848
    @fauzi5848 3 года назад +3

    clean and right to the point explanation, I like how you code naturally even while making videos 👍

  • @princechikuni5496
    @princechikuni5496 4 года назад +4

    Thank You for the VUE content bro. We needed this

  • @peaps
    @peaps 3 года назад +3

    Nice tutorial, but I was hoping to see how you would update the store from the page as opposed to the state updating itself.

  • @0xDEAD_Inside
    @0xDEAD_Inside 4 года назад +4

    Learn Vuex in 10 mins.
    Video length: 13 mins.
    Learn Vuex in 15 mins.
    Video length: 18 mins.

    • @ProgramWithErik
      @ProgramWithErik  4 года назад +2

      Haha yeah it went a few minutes over, but if you subtract out the sponsor it's closer!

    • @johnnydriesen7575
      @johnnydriesen7575 4 года назад +1

      @Kapil ... You should be happy (!!) with all the effort Erik does... #JustSaying ...

    • @0xDEAD_Inside
      @0xDEAD_Inside 4 года назад

      @@johnnydriesen7575 bro, i am. I was just being silly.

    • @0xDEAD_Inside
      @0xDEAD_Inside 4 года назад

      @@ProgramWithErik Hey thanks for the video. I was just getting started with axios in VueJS and your video was great help.

  • @TheSclare
    @TheSclare 4 года назад +3

    An updated video about extensions and themes you use would be awesome!

  • @JohnDoeX1966
    @JohnDoeX1966 2 года назад +1

    Amazing. I was intimidated by Vuex at first but this tutorial really helped me. Thank you.

  • @catlord69
    @catlord69 3 года назад

    Don't know if it's an inside joke or whatever, but it's spelled like this: "(a)synchronous"
    www.merriam-webster.com/dictionary/synchronous
    www.dictionary.com/browse/synchronous?s=t
    dictionary.cambridge.org/dictionary/english/synchronous

  • @vitiok78
    @vitiok78 4 года назад +2

    It will be nice to see the tutorial of setting up the shared state for simple projects with Vue.observable

  • @_nom_
    @_nom_ 3 года назад

    The Vue syntax is weird af. Totally inconsistent and has terrible naming conventions.

  • @vistauz
    @vistauz 3 года назад

    Are ...mapActions and this.$state.dispatches the same thing? Or there is difference?

  • @yusufakdag7418
    @yusufakdag7418 2 года назад

    which extension are you using for higlighting color for some codes

  • @tpachhangte4477
    @tpachhangte4477 2 года назад

    Any idea what extension is used for those colorful neon fonts?

  • @Romeo-vt8hq
    @Romeo-vt8hq 3 года назад

    Very quick and not really informative video...instead of explaining what's what you just sprint through the stuff without letting people understand them properly. By just copying your code I won't learn anything bruh

    • @ProgramWithErik
      @ProgramWithErik  3 года назад

      Sorru Bruh! This is free content , if you don’t like it go somewhere else!

  • @tanzimibthesam5861
    @tanzimibthesam5861 4 года назад +1

    Do you prefer Tailwind above Vuetify n Qarsar?

  • @陈木-u2m
    @陈木-u2m 2 года назад

    excure me,what's the vscode plugins

  • @cesarp6761
    @cesarp6761 4 года назад +1

    What would be the difference on storing state at the root vue level and read/ update from all children vue components? To me, vuex is too verbose just to read write “global” state vars

    • @vitiok78
      @vitiok78 4 года назад

      Vuex is suited for more complicated projects. You can totally set up shared store without all those bells and whistles with Vue.observable

  • @-el-kholasa3316
    @-el-kholasa3316 2 года назад

    please what is your theme name in vs code

  • @shanbifi
    @shanbifi 4 года назад +1

    A quick way to refresh Vuex, to the point. MapState helper fn could also be added for completeness.

  • @glatocha
    @glatocha 2 года назад

    as cool as this colours are very difficult to follow up

  • @coderex7418
    @coderex7418 2 года назад

    What theme extension are you using?????????????????

  • @evil_duck6405
    @evil_duck6405 3 года назад

    did anyone get the two peanuts joke, didn't get it :(

  • @Christopher_126
    @Christopher_126 3 года назад

    I had a ridiculous amount of trouble getting this to work. Store was never recognized.

    • @Chryst1anFRz
      @Chryst1anFRz 3 года назад

      What was the problem? I'm having It too, cant acess getters because store is undefined

  • @jakovfilipsabolicek798
    @jakovfilipsabolicek798 2 года назад

    That keyboard thock is beautiful

  • @AapVanDieKaap
    @AapVanDieKaap 3 года назад

    Why do you say gitters instead of getters? xD

  • @pravindhodare2813
    @pravindhodare2813 3 года назад

    You just doing yourself & showing quickly. Not teaching others ;)

  • @trevoroti830
    @trevoroti830 Год назад

    Why do I feel like this is a joke😄😄

  • @alauddinafifcassandra9965
    @alauddinafifcassandra9965 2 года назад

    thankyou eric, awesome

  • @alfievillarin3554
    @alfievillarin3554 2 года назад

    Best Vuex tutorial I've ever seen

  • @ajimahifeanyi2784
    @ajimahifeanyi2784 2 года назад

    Amazing. Thanks a million.

  • @RobFine
    @RobFine 2 года назад +1

    This was amazing. Great job explaining everything, Erik.

  • @xiaoya7087
    @xiaoya7087 3 года назад

    very good video,thank u

  • @cutipets8706
    @cutipets8706 3 года назад

    Hi, I wanna get data from the store, make some calculation then pass it to the template. how can i achieve it?

  • @machsunssr2257
    @machsunssr2257 3 года назад

    i laughed at that fish jokes

  • @minkhant8571
    @minkhant8571 Год назад

    Which extension is that?

  • @thilinasumithrarachchi7283
    @thilinasumithrarachchi7283 2 года назад

    Helped a lot .. Thanks

  • @danielvalente4693
    @danielvalente4693 3 года назад

    Very nice, thanks.

  • @JohnVenters
    @JohnVenters Год назад

    To answer everyone's question, the name of the theme is SynthWave '84. It was in his top themes video (ruclips.net/video/IX6ADPY52Io/видео.html). To enable the glow, you have to press Ctrl+Shift+P and enter 'Enable Neon Dreams'

  • @Arabian_Abomination
    @Arabian_Abomination 3 года назад

    For the actions functions, they take in the store as the first argument, not state. I think you made a mistake on that side Erik. Great tutorial overall though :)

  • @ch4.hayabusa
    @ch4.hayabusa 3 года назад

    8:30, if you run into to that problem, stop, think about your poor life choices, take a nap, eat well, paint some UML diagrams, and refactor your way out of the messy race condition you've made.
    One of the few people I feel like slowing down. Gj.

  • @bricxcarasco3653
    @bricxcarasco3653 3 года назад

    so cool thanks Erik

  • @arminmatthes
    @arminmatthes 3 года назад

    I just learned that we shouldn't use index as v-for key attribute. There is a great article on this topic by Michael Thiessen: michaelnthiessen.com/understanding-the-key-attribute/
    Hope this helps!

  • @andrewtay6073
    @andrewtay6073 2 года назад

    Great Tutorial!

  • @DavidSmith-ef4eh
    @DavidSmith-ef4eh 4 года назад

    Too much boilerplate. Mobx is the only sane state management solution. Everything else is just ridiculous.

  • @Alexithymiander
    @Alexithymiander 4 года назад

    Getting an error that looks like this? "npm ERR! typeerror Error: Missing required argument #1"
    $ npm --version
    3.5.2
    $ node --version
    v8.10.0
    Maybe try: sudo npm install -g npm@latest
    Node 8 and NPM 3 are deprecated :P

  • @MattDuarte11
    @MattDuarte11 4 года назад

    So I use Angular. Started learning Vue recently. so Vue does not use singleton services? We have to use state management like redux ie: Vuex? Is this the best practice for Vue?

  • @marcoconcepcion840
    @marcoconcepcion840 3 года назад

    bro, thank you so much, I just finished the video and had an unstoppable impulse to press the subscribe button ..... I almost broke my finger lol , you are a great teacher.

  • @rickyu1978
    @rickyu1978 4 года назад

    Is it bad to put all my async code in actions that can be shared throughout my app. I find myself using this pattern a lot, rather then mixins, rather than putting asycn code in the component methods, i put it in async actions. btw i like the pro tip with mapgetters object.

  • @ohhhkComputer
    @ohhhkComputer 3 года назад

    Good vimmer! Thanks! Coming from react background can understand vuex in 15 mins!

  • @tunglethanh3486
    @tunglethanh3486 3 года назад

    very clean speaking, I now understand how state&stores behaves in VueJs, thanks so much, Erik

  • @nurainaasri8603
    @nurainaasri8603 3 года назад

    Hi Erik! Can I get the source code? Im quite new in vue js and i think your code will help me understand a lot on this state management

  • @ZTF666
    @ZTF666 4 года назад +1

    always on point ! ty :D

  • @scarstreet3824
    @scarstreet3824 3 года назад

    Thanks a lot!! I really needed to cram this and your explanation was so perfect and spot on without wasting time

  • @vikasni95
    @vikasni95 3 года назад

    Tquu soo much sir.. Nice and clean explanation 😊👍❤️

  • @binoysarker903
    @binoysarker903 3 года назад

    please make a video to show how to use vuex 4 + vue 3 + typescript + vue clie latest.

  • @fafamnzm3126
    @fafamnzm3126 4 года назад

    What is your favorite global or local state management in vue-apollo?

  • @reginaldojaccosantidade4364
    @reginaldojaccosantidade4364 3 года назад

    Nice exppanation dude, will be good to raise the text size.

  • @chrishammondgp
    @chrishammondgp 3 года назад

    Dude, what VS Code theme is that? It looks sick.

  • @shadow_3213
    @shadow_3213 3 года назад

    extremely helpful content, thank you very much for that !!!

  • @tech4028
    @tech4028 4 года назад

    I hope I'll win and get your course for free. I'm 15 y/o

  • @jorden123
    @jorden123 4 года назад

    Your videos are a big save. The only problem for me is that you don't explain much when you are doing your magic, therefore this is the main reason I wouldn't purchase your Vue.js 3 course. That's a boomer for me because I really like your topics, but you must dedicate more time to explain the things you are doing.

    • @ProgramWithErik
      @ProgramWithErik  4 года назад +1

      Thanks for the tip! I do go a bit fast, I am trying different types of videos. Maybe I'll change up my teaching style

  • @rojasjahiker
    @rojasjahiker 4 года назад

    Great video Erick and cool Vscode theme!

  • @fiendsgaming7589
    @fiendsgaming7589 3 года назад

    Should've shown how to update from payload

  • @stevenson5402
    @stevenson5402 3 года назад

    I like ur explaining. Thank you very much

  • @anttinikku5374
    @anttinikku5374 3 года назад

    Dude ty for the tutorial. Helped me to keep going!

  • @nicklasnilsson8217
    @nicklasnilsson8217 4 года назад

    Very informative and great explanation, thank you!

  • @ivankljun3474
    @ivankljun3474 3 года назад

    Great content thanks for summing it up!

  • @sebastianteister
    @sebastianteister 2 года назад

    why
    semicolons

  • @metronomo1676
    @metronomo1676 3 года назад

    Direct, simple and clear! thanks a lot, great tutorial!

  • @tashriser
    @tashriser 4 года назад

    How do you make your methods names glow?

  • @ayaalnahas3577
    @ayaalnahas3577 3 года назад

    That was very smooth tutorial (y)

  • @casualSeth
    @casualSeth 4 года назад

    Synthwave '84 VS code theme

  • @franciscocordeiro8080
    @franciscocordeiro8080 2 года назад

    clean and well explained, thanks!

  • @kaiparado
    @kaiparado 3 года назад

    Thank you, very useful info. What theme do you use in vscode ?

    • @kaiparado
      @kaiparado 3 года назад

      I saw the answer in the below comments

  • @fredguth1315
    @fredguth1315 4 года назад

    What is you vscode theme?

  • @millikin2099
    @millikin2099 3 года назад

    Great video, I learned a lot!

  • @youtubewts
    @youtubewts 4 года назад

    Thanks for the content. Are you on Patreon at all yet?!

  • @LukeAvedon
    @LukeAvedon 4 года назад

    I AM READING YOUR BOOK!

  • @yendurisatish1498
    @yendurisatish1498 4 года назад

    How to mock state data

  • @kelvinzhao4960
    @kelvinzhao4960 4 года назад

    Why do we need to use getters and not read directly from the state? Isn't it reactive anyways?

    • @ProgramWithErik
      @ProgramWithErik  4 года назад

      It's a bit cleaner to use getters. And you can use getters to map, reduce, or filter your results.

    • @kelvinzhao4960
      @kelvinzhao4960 4 года назад

      @@ProgramWithErik Thanks for your reply Erik! Can I ask what do you mean it's cleaner? In what way? Yup, I understand the part about using getters if you need to transform the results, but if it's just a direct use of the state, what's the benefit of using getters?

  • @senthilkumaripaulsami5737
    @senthilkumaripaulsami5737 4 года назад

    Fantastic stuff!

  • @vkendal1000
    @vkendal1000 4 года назад

    So handsome!

  • @celsolaggui6738
    @celsolaggui6738 3 года назад

    Thank you!

  • @phind
    @phind 4 года назад

    Awesome. I learned a lot in this video👍👍

  • @ricko13
    @ricko13 4 года назад

    Alright, that was easy. thanks

  • @adam192021
    @adam192021 4 года назад

    The BEST as always!

  • @kiriitoh
    @kiriitoh 4 года назад

    Meh

  • @snowballeugene
    @snowballeugene 4 года назад

    Excellent teaching!

  • @stefanosgiannakis7151
    @stefanosgiannakis7151 4 года назад

    nice. What theme is this ?

  • @CortiBeats
    @CortiBeats 4 года назад

    How do you comment an entire line without selecting it?

    • @johnnydriesen7575
      @johnnydriesen7575 4 года назад +1

      commenting: CTRL K C
      and un-commenting: CTRL K U
      More info: www.google.com :)

    • @marcosrdg
      @marcosrdg 4 года назад

      I think CTRL + } is also for comment and uncomment entire line or selection (just in VSC)

    • @vitiok78
      @vitiok78 4 года назад

      Ctrl + /

  • @Zenatrix
    @Zenatrix 2 года назад +1

    Damnn, that was one hell of a clean explanation. I am new to vue but I have experience with react-redux and man you made my life so much simpler, thanks a lot!!

  • @saltycanucksasquatch8258
    @saltycanucksasquatch8258 3 года назад +1

    Too fast, dude! It should be a hand-holding tutorial explaining every concept and decision you make, not a video showing how fast 'you' can code.

    • @M.Zhang.780
      @M.Zhang.780 3 года назад

      this is not a live video; just pause it whenever you want or set the playback speed~