Learn Vuex in 30 minutes | Vuex tutorial | Vue.js State management tutorial

Поделиться
HTML-код
  • Опубликовано: 29 июн 2024
  • In this Vuex tutorial, I have shown an example of a simple TODO app in Vue.js 2 and Vuex 3. This example also works with Vue3 and Vuex 4 as well.
    Vuex is an official state management library for Vue.js applications. It works as a centralized store for every component in the application. In this lesson, we will learn What is Vuex state management? Why we need Vuex for large-scale Vuejs application? And all the basic concepts of the Vuex store.
    #VueJs #Vuex #VuexTutorial #Vue
    𝐆𝐢𝐭𝐡𝐮𝐛 𝐑𝐞𝐩𝐨𝐬𝐢𝐭𝐨𝐫𝐲:
    github.com/qirolab/vuex-tutor...
    ▶ 𝐋𝐞𝐚𝐫𝐧 𝐕𝐮𝐞𝐱 𝐰𝐢𝐭𝐡 𝐚 𝐛𝐚𝐬𝐢𝐜 𝐞𝐂𝐨𝐦𝐦𝐞𝐫𝐜𝐞 𝐬𝐭𝐨𝐫𝐞 𝐭𝐮𝐭𝐨𝐫𝐢𝐚𝐥:
    🔗 • Vuex tutorial (Vue.js ...
    ▶ 𝐕𝐮𝐞.js 𝟐 𝐁𝐚𝐬𝐢𝐜𝐬 𝐁𝐞𝐠𝐢𝐧𝐧𝐞𝐫 𝐓𝐮𝐭𝐨𝐫𝐢𝐚𝐥
    🔗 • Vue 2 Basics Beginner ...
    ▶ 𝐕𝐮𝐞.𝐣𝐬 𝟐 𝐂𝐨𝐦𝐩𝐨𝐧𝐞𝐧𝐭𝐬 𝐏𝐥𝐚𝐲𝐥𝐢𝐬𝐭:
    🔗 • Vue.js 2 Components, B...
    Timestamps:
    00:00 Introduction
    00:37 What is Vuex?
    00:58 Why we need Vuex in the Vue.js project?
    02:24 Compare with Vue.js 2 Options API instance and Vuex 3 Instance
    Update:
    In Vue.js 3 Option API
    ```
    import { createApp } from 'vue'
    createApp({
    data() {},
    methods: {},
    computed: {},
    })
    app.mount('#app')
    ```
    In Vuex 4:
    ```
    import { createStore } from "vuex"
    const store = createStore({
    state:{},
    getters: {},
    mutations: {},
    actions: {}
    })
    ```
    04:47 Create Vue.js App
    05:41 Install Vuex Library
    06:09 Create Vuex Store
    Now here, to create Vuex 4 Store in Vue.js 3, replace it with this snippet:
    ```
    import { createStore } from "vuex"
    const store = createStore({
    state:{},
    getters: {},
    mutations: {},
    actions: {}
    })
    export default store
    ```
    And in the `main.js` use this snippet:
    ```
    import { createApp } from 'vue'
    import App from './App.vue'
    import store from "./store/store"
    const app = createApp(App)
    app.use(store)
    app.mount('#app')
    ```
    07:31 Create an Example of a simple TODO list
    𝐃𝐢𝐠𝐢𝐭𝐚𝐥𝐎𝐜𝐞𝐚𝐧 𝐑𝐞𝐟𝐞𝐫𝐫𝐚𝐥
    m.do.co/c/e740238537d0
    Support my work:
    1. On BuyMeACoffee: www.buymeacoffee.com/qirolab
    2. On Patreon: / qirolab
    Also, follow us on:
    𝐅𝐚𝐜𝐞𝐛𝐨𝐨𝐤: qirolab
    𝐓𝐰𝐢𝐭𝐭𝐞𝐫: / qirolab
  • НаукаНаука

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

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

    In this Vuex tutorial, I have shown an example of a simple TODO app in Vue.js 2 and Vuex 3. This example also works with Vue3 and Vuex 4 as well. You just need to make few small following changes.
    Timestamps:
    00:00 Introduction
    00:37 What is Vuex?
    00:58 Why we need Vuex in the Vue.js project?
    02:24 Compare with Vue.js 2 Options API instance and Vuex 3 Instance
    Update:
    In Vue.js 3 Option API
    ```
    import { createApp } from 'vue'
    createApp({
    data() {},
    methods: {},
    computed: {},
    })
    app.mount('#app')
    ```
    In Vuex 4:
    ```
    import { createStore } from "vuex"
    const store = createStore({
    state:{},
    getters: {},
    mutations: {},
    actions: {}
    })
    ```
    04:47 Create Vue.js App
    05:41 Install Vuex Library
    06:09 Create Vuex Store
    Now here, to create Vuex 4 Store in Vue.js 3, replace it with this snippet:
    ```
    import { createStore } from "vuex"
    const store = createStore({
    state:{},
    getters: {},
    mutations: {},
    actions: {}
    })
    export default store
    ```
    And in the `main.js` use this snippet:
    ```
    import { createApp } from 'vue'
    import App from './App.vue'
    import store from "./store/store"
    const app = createApp(App)
    app.use(store)
    app.mount('#app')
    ```
    07:31 Create an Example of a simple TODO list

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

    Please consider yourself a hero. You are too much!!! You have dealt with state management in Vuejs decisively, congratulations.

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

    Awesome tutorial! Easy and show what we need to know :) Thank you a loot!

  • @JeffDZ40
    @JeffDZ40 3 года назад +6

    3:36 minutes in and i have to tell you that your comparison between the Vuejs and Vuex instances unlocked a new door for me. I'm excited to go through the playlist. Well done, my friend!

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

      Thank You

    • @Mr.science007
      @Mr.science007 2 года назад +1

      stopped the video at 2:13 just to give it a like. already knew it was gonna be good!

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

    Straight to the point very well done thank you

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

    Straight to the point. Just what i needed.

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

    The BEST as always!!

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

    Bravo, your explanation is just awesome. Now i feel more confident about to use vuex. Thank you so much for being so awesome.

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

    Amazing tutorial , thanks !

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

    it was great to Vuex understanding

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

    This tutorial helps me understand Vuex better, especially when you compare Vuex with normal Vue methods, thank you

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

      Glad to hear that!

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

    *Don't get left behind! Download JavaScript: ES2015 to ES2023 - eBook and become a JavaScript pro!*
    👉 qirolab.gumroad.com/l/javascript-from-es2015-to-es2023

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

    wow
    I am really grateful that i found this.
    thank you for this.🙏

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

    Very clear! thank you!!

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

    Great tutorial, now I can start using state management in all my applications
    👏

    • @QiroLab
      @QiroLab  5 месяцев назад

      Thank you! Cheers!

  • @mehulsharma8608
    @mehulsharma8608 3 месяца назад

    Very useful video, Love it Thanks :)

    • @QiroLab
      @QiroLab  3 месяца назад

      Glad to hear that!

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

    very NYC tutorial for Bigners

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

    Very useful video! Thank you😊

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

      You're welcome 😊

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

    thank you very much.

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

    very nice to share, love it

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

      Thank you! Cheers!

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

    So clear and easy to follow and understand. Thank you!

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

      Glad to hear that

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

    Very useful tutorial. Thanks for sharing it with us

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

      Glad it was helpful!

  • @KamalKhan-bc8lz
    @KamalKhan-bc8lz 4 года назад

    If there is more than like, subscribe i would do that. It's totally outstanding among other vuex tutorial on RUclips! Thank You brother. Carry on pls

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

    Awesome and Very nice explanation...

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

      Thanks a lot

  • @user-ho7jz6yu4v
    @user-ho7jz6yu4v 5 месяцев назад

    wow thank you so much

    • @QiroLab
      @QiroLab  5 месяцев назад

      Glad you like it!

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

    thank you for this tutorial

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

      You're welcome 😊

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

    insane. thanks sir.

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

      You're welcome

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

    Tnx

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

    Great bro💕❤

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

      Thank you so much 😀

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

    Very good tutorial

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

      Thank you! Cheers!

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

    25:50 mapSpate, mapGetters, mapActions

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

    Awesome, what do you think about a course on udemy or something from scratch by doing real example blog with dashboard? Have a nice day.

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

      Sure, I will create tutorial on that also.

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

    I don't know how much i can pay you for your great investment in helping us understand freely these knowledge, was kinda confused in transiting from vuex2 to 3.God bless u so much. Asante Sana.

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

      Great to hear!

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

    I followed your code to do my project, it showed me "todo. title" is undefined. do you know how to fix it.

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

    Hello friend, what is the terminal where you work?

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

      I am using ZSH with oh-my-zsh on my terminal. I have already created a video on this. You should watch that video also:
      ruclips.net/video/ANxLmiLXtFM/видео.html

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

    I'm using Vue 3. Does the code in this tutorial series work with Vue 3?

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

      Yes, this code is valid for Vue 3 as well. All the Vue2 code is valid in Vue 3, But there some deprecated syntax that you can learn in this video:
      ruclips.net/video/FXsWed7Nc2o/видео.html
      I also recommend you to watch the complete Vue 3 Tutorial series as well. Here is the playlist:
      ruclips.net/p/PL1TrjkMQ8UbWg8f8EpkpZntxdQldkBipE

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

      @@QiroLab Thank you for replying. I installed Vue extension for chrome. But when I inspect it, the vue tab shows only the elements of the page. There is no vuex tab. Why is that?
      Right now I'm using Vue 3.0.0.0 with Vuex 4.0.0.0

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

    syntax-wise very good but you gotta improve in your teaching style. Do-as-I-do is not teaching.

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

      Thank you for your feedback. I am working hard to improve my teaching style. Please watch my recent videos and give your feedback, how much I improved? Thank you.

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

      Why don't you start your own channel? I'm sure some of your frnds very excited abt this idea