Vuex | State management example with Axios

Поделиться
HTML-код
  • Опубликовано: 29 июн 2024
  • How to Use Vuex in Vue Js application.
    In this video we make simple setting in order to use vuex.
    For bonus we are making ajax call with axios within the vuex.
    Udemy course - Vue JS 2 - The Complete Guide: bit.ly/2Zb5UEs
    Video on How to install Vue CLI: • Installing Node js, Ya...

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

  • @jamesw.3032
    @jamesw.3032 4 года назад +2

    Great to see a simple example to clearly visualize the logical flow of state management concept

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

    Explicação simples e Clara. Muito bom !!!👏🏽👏🏽👏🏽

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

    Love this, clear and well explained. Thank you.

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

      You are very welcome!

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

    simple example and clear ! the best video about vuex that I watched

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

      Thank you Jhony. I am glad that you enjoy the video!

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

    Simple and easy to understand. Very good and helpful tutorial.

  • @yo1414
    @yo1414 5 лет назад +1

    Very nice explanation! Thank you for your time!

    • @Sweetdev
      @Sweetdev  5 лет назад

      You are very welcome Steve!

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

    Very simple example thanks

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

      You are welcome! 😊

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

    that intro song!!!! LIT

  • @centryplan5413
    @centryplan5413 5 лет назад +1

    Your video is very informative and helpful thanks for your kindness

    • @Sweetdev
      @Sweetdev  5 лет назад

      Thank you Centry Plan. I'm glad that was helpful for you!

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

    Thanks you ! great ! it's clear ! and simple ;-) welldone

  • @elvandiano9748
    @elvandiano9748 5 лет назад +2

    so usefull, i will waiting your next video guys, thanks ..

    • @Sweetdev
      @Sweetdev  5 лет назад +1

      Thank you and welcome to my channel! good to have you here

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

    Neat ... learnt why API call not working :D Thanks for that. Accessing store properties directly in components has a tricky boilerplate code. Got it all wrong the first time

  • @bowaller6892
    @bowaller6892 5 лет назад

    Great video!!!

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

    i love this guy

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

      Love you back 😀

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

    Thank you, very good tutorial.

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

      You are very welcome Hein! I am glad that is helpful for you. Very soon is coming new update version. stay tune

  • @josephk3809
    @josephk3809 5 лет назад

    Thanks a lot, very useful video! Actions before mutation, for async operations and axios😏. And getters... ?

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

    thanks !!!!!! Great tutorial !!!

  • @ralphdas3954
    @ralphdas3954 5 лет назад +3

    Great tutorial although a bit slow for my liking but the 1.5x speed increase came in handy :-) Small side-note, as far as I now the Axios library is not a wrapper around the Fetch API but a wrapper around the more traditional XHR API.

    • @Sweetdev
      @Sweetdev  5 лет назад

      Hope you subscribe because I need people like you! :-) Thank you so much for the feedback...and you are right about the XHR API.

  • @fikaridaulmaulayya4635
    @fikaridaulmaulayya4635 3 года назад +2

    thanks very much man!

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

      You are very welcome Fika!

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

    What about getting input from a form an putting that as the search term, ie variable in to the get request, event or whatever? Thanks

  • @ManjitNotay
    @ManjitNotay 5 лет назад

    thanks v . useful

  • @PHONGPHAM-qu7vw
    @PHONGPHAM-qu7vw 4 года назад +1

    tks u!!! it's save my day

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

      Hey PHONG! I'm glad that it was helpful for you 🤝

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

    awesome tutorial

  • @lithinjoseph824
    @lithinjoseph824 5 лет назад +1

    thanks for the video (y)

    • @Sweetdev
      @Sweetdev  5 лет назад

      You are very welcome! Hope that you find the upcoming videos helpful as well.

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

    Thank you, it's the first tuto really simple et comprehensible.
    Can you tell me the name of vscode extension you use for vue? thx a lot again.

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

      @Jerome Diaz Thanks man! I'm glad that was helpful for you. You can use easily the suggest extension from vscode 'Vetur'

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

    How to insert data trough api with file using Laravel rest full api in Vue js using vuex ?

  • @uSil031
    @uSil031 5 лет назад +2

    Great tutorial, although in my code, ...mapState(['something']) gives me the TypeError: Object(...) is not a function. What to do..?

    • @uSil031
      @uSil031 5 лет назад +2

      Solved.. the reason was the import of mapState was not in curly brackets.. lovely

  • @badid0y
    @badid0y 5 лет назад +1

    Nice tutorial! Btw what OS are you using?

    • @Sweetdev
      @Sweetdev  5 лет назад

      It's Ubuntu with Pop OS icons if I'm not wrong

    • @badid0y
      @badid0y 5 лет назад +1

      @@Sweetdev Thanks Bro

  • @bowaller6892
    @bowaller6892 5 лет назад +1

    if you separate one part of your code as module then what you will do?
    I try with async/await and Promise to resolve. This not solve my problem at all. How you react to this situation?

    • @Sweetdev
      @Sweetdev  5 лет назад

      Hey Bo! Thank you to stopping by. If you found better way to be implemented we all going to appreciate your contribution.

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

    [Vue warn]: Property or method "items" is not defined on the instance but referenced during render please help!

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

      Hi Ankit. Thank you for stopping by! can you show me the piece of code that you get this error ?

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

    question sir: if something changed in the API it will be automatically changed in the web directly?

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

      Hey Marc. Every time when a user hits your website, the call it's going to be made and the response will give you back the last changes.
      If you need this to happen in the background you can make your client site refresh this call in every X minutes. Hope this will answer your question, if not let me know and I will search for different solution for you!

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

    Very good

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

      Thank you Aleksandar!

  • @ikhsanrahman9703
    @ikhsanrahman9703 5 лет назад

    then, how to update the data in vuex ? i mean is, we want to update a data that hits API

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

    A git repository would've been awesome!

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

      You're right Nilesh. A new update version of the video is coming soon son I will try to include the git repo in this version :-). Thank you for the suggest!

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

      @@Sweetdev
      Did an updated version come out? Link please.

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

      @@BenHayat ruclips.net/video/hsmffuEzasM/видео.html

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

      @@Sweetdev
      Thanks.

  • @abderrazzakmeskine3627
    @abderrazzakmeskine3627 5 лет назад +1

    danke

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

    On mine this.$store.despatch('loadAlbums') is error, despatch is not a function?

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

    I get this vue.runtime.esm.js?2b0e:619 [Vue warn]: Error in mounted hook: "TypeError: this.$store.despatch is not a function"

  • @devKazuto
    @devKazuto 5 лет назад

    commit("SET_POSTS", posts); does not work for me: ESLint: 'commit' is not defined. (no-undef)

    • @Sweetdev
      @Sweetdev  5 лет назад

      Hi Kazu. Can you provide us with little bit more info? Can we see how your store.js it's look like?

    • @MCFreddie777
      @MCFreddie777 5 лет назад

      @@Sweetdev i suppose you didnt put commit in curly brackets as well... ({commit}).

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

    Get this in mounted hook: "TypeError: this.$store.despatch is not a function" is there another way?

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

    watch on 1.25 speed at least

  • @PopescuMarian
    @PopescuMarian 5 лет назад +3

    20 minutes that could have been only 5...