Vuex Killer? A Quickstart Guide With Vue.js Store Pinia With TypeScript- Pinia Vue.js Store Tutorial

preview_player
Показать описание


0:00 Introduction
1:46 What is Pinia?
2:17 Create a Vue 3 Pinia App
5:34 Create the Counter Store
14:57 Testing the app out

___

Links (and code)

Рекомендации по теме
Комментарии
Автор

Another incredible video.
You are undoubtedly an inspiration for aspiring web developers.
I saw most of your videos, and I just loved them, geniuses.
I even created a channel, where I also share my knowledge.
Thank you, you're a hero.

DevMadeEasy
Автор

at 16:14 I'm a bit confused: I'm a .Net developer initially, and I love the typescript approach. But what is the point of typing input parameters, to force values as "number" if finally we can still receive a string? It means that even with typing variables, we should do some type checks inside methods?

jnch
Автор

Pinia looks really good with Typescript. It reminds me on React's Easy Peasy. If Vuex won't have this good type safety, I'll go with pinia no doubt. Thank you for sharing this amazing package :D

stefanbogdanovic
Автор

Looks very interesting. How long till it is ready for production on a large project?

MarkGoddard
Автор

Thank you for a great job! I will try Pinia, but it's not clear to me - is Pinia state "module" save internal state and share it for numbers of components? Is the component "A" and "B" use some shared state, or create own one?

ДмитрийКарпич
Автор

Quick question, why wasn't typescript able to catch the error with a string being passed to addValue? Isn't that the whole purpose of typescript?

minidude
Автор

All in all nice! But perhaps a bit misleading to create a getter for a value you can read directly from the store. This might give beginners the wrong idea about the purpose of getters. It would actually have been a perfect use case for the "double". But that one you put in the component instead😢

dealerpriest
Автор

I would go for Pinia rather than vuex 4 for a new vue 3 project as from the RFC it seems vuex 5 is almost same as Pinia. Later, once it reaches stable release, it will be a lot easier to migrate from Pinia to vuex 5 rather than from vuex 4 to vuex 5.

blank
Автор

Спасибо за науку. Это оказалось удобнее, чем VUEX

yakut
Автор

It would be hard to kill Vuex, being that it's maintained by the core team and that's one thing I love about it. I used to hate having to setup Redux or something else for every single application.

FaradayAcademy
Автор

is there a plugin for this?.... like the awesome Vue plugin that has Vuex integration

johnm
Автор

I still haven't tried using Typescript yet (I know, I know), but shouldn't it have caught the issue where you were concatenating strings from your input? You told it the type was supposed to be a number, right?

amoliski
Автор

Говоришь красиво но я не понимаю, Удачи тебе бро процветанию твоему каналу ✊💯

nouchance
Автор

Hm, try to go to another page and return back - and the store will be broke :( Seems Pinia not ready for Vue v3.

ДмитрийКарпич
Автор

You should add more information when to use a store because using global state isn’t often useful. To show using patch outside the store is also not a good example for a beginner course. Use patch inside store actions!

marcelmueller
Автор

Pinia is truly awesome! I'm pretty sure that this or similar approaches will kill vuex! Especially with a typescript project :)

MrSabifa
Автор

TypeScript does not have a sound type system. Look at @16.07, you have defined a number but the code passed a string and TS allowed for that.

hipertracker
Автор

Is there any advantage of using Pinia/Vuex instead of Vue.reactive() ?

flexdash
Автор

I didn't get it, why is this different than Vuex?

humansaremortal
Автор

With provide/inject pattern in place, I could totally skip Pinia due to its lack of dynamic store ability.

jingzheshan
welcome to shbcf.ru