VueX 4 With Typescript And Decorators | Tutorial

VueX 4 With Typescript And Decorators | Tutorial

Greg The Dev

3 года назад

4,966 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

@Myself0094
@Myself0094 - 22.01.2023 19:17

Thanks man. I was terrified by amount of boilerplate typescript vue requires.
But this stuff helps to reduce it to even smaller amount that is in classic js vue.

Ответить
@muhamedahmatovic4345
@muhamedahmatovic4345 - 20.08.2021 16:59

So with this I don't need to use injectionKeys, define separately action/mutation types just to get typescript when using commit or dispatch? This is genius. Decorators ftw!

Ответить
@kurasaored2775
@kurasaored2775 - 21.03.2021 16:24

Have you used this in production with Vue3?

Ответить
@binoysarker903
@binoysarker903 - 11.03.2021 08:35

how can i use nuxtServerInit using this package in nuxt js project

Ответить
@heliumracoon
@heliumracoon - 10.03.2021 18:50

Question: With this setup, when I change something and save, in the console appears: "[vuex] duplicate namespace Title/ for the namespaced module Title vuex.esm-browser.js:677
[vuex] state field "Title" was overridden by a module with the same name at "Title"".

Does anybody now, how I can solve this?

Ответить
@heliumracoon
@heliumracoon - 10.03.2021 15:36

So far the best video I found for vuex-module-decorators in vue3, typescript, vuex4. In combination with official docs a great kickstart on this topic.

Ответить
@maskman4821
@maskman4821 - 27.02.2021 06:58

Thank you man, this is a great example of using vuex with typescript in composition-api, nice job !!!

Ответить
@aqueleprogramador
@aqueleprogramador - 24.02.2021 04:01

thanks!!!!!!

Ответить
@LucTemetNosce
@LucTemetNosce - 23.02.2021 02:36

Wow! So simple! This needs more views. It's like 10x easier than the other vuex typescript tutorials in here.

Ответить
@rolikaseventysix
@rolikaseventysix - 15.01.2021 05:40

Thanks dude!

Ответить
@szyszak
@szyszak - 09.01.2021 03:00

Great tutorial. I've just started learning Vue and was pretty disappointed with weak TypeScript support in Vuex. Could you create a repo on GitHub with this code for future reference and add a link in the description? This would help a lot. Cheers.

Ответить
@phuntsok334
@phuntsok334 - 21.12.2020 13:17

Amazing! had been pulling my hair understanding TS implementation on vuex. you have saved my hair😉 Thanks a lot

Ответить
@allothernameswherealreadytaken
@allothernameswherealreadytaken - 14.12.2020 01:32

Thank you very much!
I've been looking at a lot of different approaches and tutorials trying to understand the best way to use Vuex 4 with typescript and this was by far the most elegant solution!

Ответить