Тёмный

Vuex Basics in Vue 3 with Composition API in 6 minutes 

Justin Brooks
Подписаться 16 тыс.
Просмотров 22 тыс.
50% 1

Today we will be creating a simple counter app from scratch to learn the basics of using Vuex 4 with Vue 3 Composition API. We'll start by taking a look at Vuex concepts like state, getters, and mutations and how to use them within the options API, then we will switch over the compositions API and implement the same functionality. We'll also create some reusable helper functions to make accessing the store in the composition API more readable.
#vue #vuex #composition-api
Discord - / discord
Twitter - / jsbroks
⚡ RESOURCES ⚡
Vuex 4 Docs - next.vuex.vuejs.org/guide/#th...
Vue 3 - v3.vuejs.org/
Composition Vuex Helper functions Issue - github.com/vuejs/vuex/issues/...
Source Code - github.com/codingwithjustin/v...
⭐ TIMESTAMPS ⭐
0:00 - Intro
1:08 - Creating a project
1:17 - Vuex Concepts
2:45 - Options API
3:35 - Vuex map Functions
4:24 - Composition API
5:00 - Composition Helper Functions
6:02 - Conclusion

Наука

Опубликовано:

 

3 июл 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 32   
@zbynekjurica
@zbynekjurica 3 года назад
This is actually insanely high quality tutorial. Keep it up!
@Squawkize
@Squawkize 3 года назад
Appreciate this tutorial! I was looking everywhere on how to use the mapstate in the composition api. Thank You!
@user-mg3ul1zb3s
@user-mg3ul1zb3s 3 года назад
Thank you, I've been looking for such a video for a long time
@arsalabangash
@arsalabangash 3 года назад
Brilliant work Justin!
@luischinchilla-garcia5640
@luischinchilla-garcia5640 3 года назад
Absolutely amazing!
@pavelino17
@pavelino17 2 года назад
This video was really helpful and clear, thank you.
@Majik_exe
@Majik_exe 3 года назад
Used the helpers in a project im working on, Nice!!!
@namero999
@namero999 2 года назад
Thanks for respecting my time.
@carlomigueldy
@carlomigueldy 3 года назад
Good stuff!
@Useroelas97
@Useroelas97 2 года назад
thank you so much brother (y)
@dexmbachu
@dexmbachu 7 месяцев назад
Thanks for this, i wondered why i couldn't use mapGetters in vue3 composition api.
@mauriciom7691
@mauriciom7691 Год назад
thanks you!!
@bunnyhaldar8740
@bunnyhaldar8740 3 года назад
👍👍
@wijaksanapanji
@wijaksanapanji 3 года назад
Love it! but I think the background music a bit to loud.
@ZynthProductions
@ZynthProductions 3 года назад
does the helper gonna work with namespacing?
@SirAlexMayo
@SirAlexMayo 2 года назад
How does it work with different named spaced modules?
@gtbaba123
@gtbaba123 Год назад
In start I didn't vuex so now can i do it manually?
@zombaju
@zombaju 3 года назад
i don't know when to use options or composition api?
@SyedHaroon786
@SyedHaroon786 3 года назад
Nice tutorial, is there a way to do name-spacing?
@rngbaguette
@rngbaguette 2 года назад
Yes there is! For the state for example, you’d need to put in the namespaced „path“ so to say after your desired property: store.state.some.module.counter store.getters.some.module/getCounter store.commit(some.module/SETCOUNTER, payload)
@shutterradio
@shutterradio 3 года назад
Do I need to use Vuex 4 in order to use it with composition-api in a vue 2 project?
@CodingWithJustin
@CodingWithJustin 3 года назад
You'll need Vuex 3, I dont think Vuex 4 is combatiable with vue 3
@Byku010
@Byku010 3 года назад
I do lvoe ur videos about vue! I only miss part, where u do tutorial with typescript instead of js only ;/
@yeravl
@yeravl 2 года назад
Vuex or composition API? What's better?
@yuvoria.official
@yuvoria.official 3 года назад
Options is prefer
@kinax2
@kinax2 3 года назад
What about actions ?
@CodingWithJustin
@CodingWithJustin 3 года назад
Checkout my other videos
@robertotonino2916
@robertotonino2916 3 года назад
If you’re committing from the store, why are you calling the helper function useMutations? Shouldn’t it be useActions?
@CodingWithJustin
@CodingWithJustin 3 года назад
Commits call mutations, while dispatch calls actions
@robertotonino2916
@robertotonino2916 3 года назад
@@CodingWithJustin you’re right I always get confused, sorry!
@LukeryaPereprygova
@LukeryaPereprygova 3 года назад
ничо нипонил
Далее
Advanced Vuex with Modules, and Actions in Vue 3
7:49
Creating a Vuex Clone with Vue 3 Composition API
6:30
Vue explained to React Developers in 6 mins
6:33
Просмотров 39 тыс.
15 Vue 3 Tips and Tricks
6:36
Просмотров 32 тыс.
Learn Pinia in 30 MINUTES! (Vue JS 3)
33:58
Просмотров 114 тыс.
React explained for Vue developers in 7 mins
7:48
Просмотров 14 тыс.
Introduction To Pinia | Vue 3
12:52
Просмотров 7 тыс.
Vuex | State management example with Axios
22:37
Просмотров 58 тыс.
Vue 3 Composition API Introduction [FULL TUTORIAL]
23:46