Vuex 4 with Vue.js 3 and TypeScript is a great combination. In this video we'll explore how to use Vuex 4 with TypeScript and how you can set types everywhere! #vuex #vuejs3 #vue3 👉Check out my last video on Vue 3 With TypeScript 🤍youtu.be/V9MmoBAezD8 📚 Sign up and get notified about my new Vue 3 course! And get a free cheat sheet! — 🤍bit.ly/2vFWBQi 🔥🔥 Andrei's Awesome Courses - 🤍bit.ly/2WvM9FR 0:00 Introduction 1:33 What the App Does 2:40 The Problem 5:10 Defining Store Mutations 10:24 Defining Actions 13:09 Defining Getters 14:12 Definining Store Type 16:08 Define createStore 18:40Setting up useStore and example ♡ ♡ ♡ Make Sure To Check These Courses Out On Udemy! 💻 → JAVASCRIPT ALGORITHMS COLT STEELE'S COURSE - 🤍bit.ly/2L8HSPV → THE WEB DEVELOPER BOOTCAMP (GREAT FOR BEGINNERS) — 🤍bit.ly/2zP4alw 👉 Algo expert is the best way to learn algorithms! Check out my code and get 15% off at checkout with code "erik" 🤍algoexpert.io/erik _ Links (and code) 🤍github.com/ErikCH/Vue3TypeScript/tree/vuex 🤍dev.to/3vilarthas/vuex-typescript-m4j MY WEBSITE — 🤍🤍programwitherik.com MY TWITTER — 🤍🤍twitter.com/erikch
Why they created TS?
- to make `any` objects everywhere
Спасибо тебе, мужик! Ты очень мне помог!
Type script sucks . Can't use store out of box. It says useStore is undefined.
STOP WATCHING THIS VIDEO. Go watch his Pinia one instead. Vuex 4 with TS is convoluted and utterly a waste of time.
i find it very hard to sell Vuex to people because of the lack of typings out of the box. Angular's ngrx and ngxs felt superior to Vue's Vuex because of typings..
implementation of vuex 4 into vue3 with typescript is simply "disgusting".
complicated 🙄😟
Awsome video as alway Erik, Could you do a follow up video of how to implement this in Quasar V2. I have tried making changes while following the video but I get some additional errors which I think are to do with the way Q2 is handling state modules and the StateInterface. Complexity is in having multiple modules and the getters, mutations and actions spread across multiple files. Also an example with something other than a primitive data type would be super-useful. Keep up the good work.
I have a question...how to use this to support namespaced modules..I cannot use store.dispatch("auth/login")
how beautiful and simple vuejs is but typescript is doing <public> rape of vuejs.
i didn't understand a single thing
please good teach ..
thanks this tutorial
At what point would you justify the added complexity of TS with Vue?
With the love that he had taken to MapActions, etc.
Is vuex even necessary anymore now that we have hooks in vue? Why not just import/export a reactive via a custom hook?
Great walkthrough! I just can't see myself writing so much boilerplate for example for 10+ vuex modules. I'm pretty happy with vuex without TS. Vuex in itself is a lot of boilerplate code. In most of my cases, I work with a bunch of objects/object literals so most types end up being "any" anyway - so wtf does TS do for me there? Please enlighten me, I may be missing something obvious.
A side question.. Has anyone been able to use Vue 3 with Vuetify? Cannot seem to be able to install it properly with Vue 3.
I think there are Java developers infiltrated on TypeScript team