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
*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
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!
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.
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: th-cam.com/video/ANxLmiLXtFM/w-d-xo.html
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: th-cam.com/video/FXsWed7Nc2o/w-d-xo.html I also recommend you to watch the complete Vue 3 Tutorial series as well. Here is the playlist: th-cam.com/play/PL1TrjkMQ8UbWg8f8EpkpZntxdQldkBipE.html
@@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
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.
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
*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
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!
Thank You
stopped the video at 2:13 just to give it a like. already knew it was gonna be good!
Please consider yourself a hero. You are too much!!! You have dealt with state management in Vuejs decisively, congratulations.
Awesome tutorial! Easy and show what we need to know :) Thank you a loot!
Straight to the point very well done thank you
The BEST as always!!
Straight to the point. Just what i needed.
Bravo, your explanation is just awesome. Now i feel more confident about to use vuex. Thank you so much for being so awesome.
This tutorial helps me understand Vuex better, especially when you compare Vuex with normal Vue methods, thank you
Glad to hear that!
Very useful video, Love it Thanks :)
Glad to hear that!
Great tutorial, now I can start using state management in all my applications
👏
Thank you! Cheers!
it was great to Vuex understanding
Very useful video! Thank you😊
You're welcome 😊
wow
I am really grateful that i found this.
thank you for this.🙏
So glad!
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.
Sure, I will create tutorial on that also.
Amazing tutorial , thanks !
I followed your code to do my project, it showed me "todo. title" is undefined. do you know how to fix it.
If there is more than like, subscribe i would do that. It's totally outstanding among other vuex tutorial on TH-cam! Thank You brother. Carry on pls
Very clear! thank you!!
So glad!
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.
Great to hear!
25:50 mapSpate, mapGetters, mapActions
So clear and easy to follow and understand. Thank you!
Glad to hear that
Awesome and Very nice explanation...
Thanks a lot
very NYC tutorial for Bigners
very nice to share, love it
Thank you! Cheers!
thank you for this tutorial
You're welcome 😊
Very useful tutorial. Thanks for sharing it with us
Glad it was helpful!
Hello friend, what is the terminal where you work?
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:
th-cam.com/video/ANxLmiLXtFM/w-d-xo.html
wow thank you so much
Glad you like it!
Great bro💕❤
Thank you so much 😀
I'm using Vue 3. Does the code in this tutorial series work with Vue 3?
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:
th-cam.com/video/FXsWed7Nc2o/w-d-xo.html
I also recommend you to watch the complete Vue 3 Tutorial series as well. Here is the playlist:
th-cam.com/play/PL1TrjkMQ8UbWg8f8EpkpZntxdQldkBipE.html
@@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
thank you very much.
Very good tutorial
Thank you! Cheers!
Tnx
insane. thanks sir.
You're welcome
syntax-wise very good but you gotta improve in your teaching style. Do-as-I-do is not teaching.
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.
Why don't you start your own channel? I'm sure some of your frnds very excited abt this idea