Тёмный

State managment in Vue 3 with Typescript - Vuejs Pinia Tutorial / Vuex Killler? 

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

Наука

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

 

4 окт 2024

Поделиться:

Ссылка:

Скачать:

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

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 24   
@SamWynne
@SamWynne 2 года назад
Great video as always Justin, I really appreciate the cadence of your voice. I've really enjoyed a handful of your videos, but today you got my sub. See you soon
@derekbressler9154
@derekbressler9154 3 года назад
vue is the best!
@hassaniqbal6199
@hassaniqbal6199 3 года назад
agree
@derekbressler9154
@derekbressler9154 3 года назад
agree
@CodingWithJustin
@CodingWithJustin 3 года назад
agree
@ilug5197
@ilug5197 3 года назад
Yep⚡
@tyaho83
@tyaho83 Год назад
agree
@x0r1k
@x0r1k 3 года назад
Hi. Which font do you use in terminal at 3:00? It's so nice P.S. Thanks for the video, your quality rocks! You deserve more views
@CodingWithJustin
@CodingWithJustin 3 года назад
Its called Cascadia Mono. Its the default font for windows preview terminal. Thanks for the support! Gald you enjoyed!
@MrChickenpoulet
@MrChickenpoulet 3 года назад
Yea interesting library, main advantage is that you have access to the devtool (which you forgot to show!). Also, in Vue2 you could have more or less the same feature using Vue.observable function (which has been replaced by the reactive function in Vue3!), so since vue 2 you could already drop vuex and enjoy a global state mangement with awesome type checking features ! The only downsides I have found about dropping vuex and doing self made store is that you do not have access to the devtools anymore and some vuex plugins. But I never used any vuex plugins so it's ok for my use cases, and the devtools was useful because of the lack of great type checking while using vuex. For me, vuex might be dead for good!
@hackwithharsha5228
@hackwithharsha5228 3 года назад
Hey, Thanks for sharing.. we have something similar instead of using vue.observable, we used vue-composition-api plugin for Vue-2 project..
@URKI3221
@URKI3221 2 года назад
how can i store it in Localstorage?
@michaelpumo83
@michaelpumo83 3 года назад
Would it be better to destructure the cart variable from within setup, so that it's less prone to breaking? You wouldn't know it will break in the template at runtime until you did something wrong like: cart.deleteAllItems(). Better to do: const { itemsCount } = useCartStore() return { itemsCount }
@CodingWithJustin
@CodingWithJustin 3 года назад
The store is an object wrapped with reactive. You could use toRefs or enable template interpolation service so you know in the template if something is broken (feature in beta).
@timercadoindustrialmi
@timercadoindustrialmi 2 года назад
Thanks for this tutorial! I just followed as it goes, but I'm getting this issue, any advice to fix it? : PS C:\Learning\Vue\Pinia\pinia-shopping-cart> npm run serve > pinia-shopping-cart@0.1.0 serve > vue-cli-service serve INFO Starting development server... ERROR ValidationError: Progress Plugin Invalid Options options should NOT have additional properties options should NOT have additional properties options should NOT have additional properties options should pass "instanceof" keyword validation options should match exactly one schema in oneOf ValidationError: Progress Plugin Invalid Options options should NOT have additional properties options should NOT have additional properties options should pass "instanceof" keyword validation options should match exactly one schema in oneOf at validateOptions (C:\Learning\Vue\Pinia\pinia-shopping-cart ode_modules\webpack ode_modules\schema-utils\src\validateOptions.js:32:11) at new ProgressPlugin (C:\Learning\Vue\Pinia\pinia-shopping-cart ode_modules\webpack\lib\ProgressPlugin.js:62:3) at new Progress (C:\Learning\Vue\Pinia\pinia-shopping-cart ode_modules\progress-webpack-plugin\index.js:25:21) at new progressPlugin (C:\Learning\Vue\Pinia\pinia-shopping-cart ode_modules\progress-webpack-plugin\index.js:127:10) at C:\Learning\Vue\Pinia\pinia-shopping-cart ode_modules\webpack-chain\src\Plugin.js:14:18 at Object.toConfig (C:\Learning\Vue\Pinia\pinia-shopping-cart ode_modules\webpack-chain\src\Plugin.js:78:22) at C:\Learning\Vue\Pinia\pinia-shopping-cart ode_modules\webpack-chain\src\Config.js:129:63 at Array.map () at module.exports.toConfig (C:\Learning\Vue\Pinia\pinia-shopping-cart ode_modules\webpack-chain\src\Config.js:129:40) at Service.resolveWebpackConfig (C:\Learning\Vue\Pinia\pinia-shopping-cart ode_modules\@vue\cli-service\lib\Service.js:261:34)
@manjubeli
@manjubeli 3 года назад
Great video, thanks for introducing to pinia. Errors importing Pinia "pinia.mjs 1083:44-52 Can't import the named export 'computed' from non EcmaScript module (only default export is available)" checking on Pinia github issues.
@nicojmb
@nicojmb 3 года назад
Graeat video, can you make new with persistent storage support with pinia and vue3?
@Paul7Peterson
@Paul7Peterson 3 года назад
If you like piña coladas... 🎶🎤🍍 Awesome library... I really think Vuex should be completely rethought (even after the improvements of v4) or come with a better alternative with official support inside the core ecosystem. This is for sure an alternative that I'm gonna try in the next project.
@tony-ma
@tony-ma 2 года назад
Amazing
@namng5422
@namng5422 3 года назад
how about modules like vuex ?
@luk318
@luk318 3 года назад
I just hate Vuex, even that I was using it in every project. I was not aware about Pinia. For sure I will test that, thanks.
@georgemendle5587
@georgemendle5587 3 года назад
From last one week I am struggling with vuex. Thankfully I found video from Justin. Now I will not learn vuex anymore.
@luk318
@luk318 3 года назад
@@georgemendle5587 For Vue 3 you do not have to use neither of those, composition api will do.
@georgemendle5587
@georgemendle5587 3 года назад
@@luk318 but how. Do you have any social media account through which we can connect. Yeah I read one article on how manage state without vuex by using composition api.
Далее
Pinia Simplified
4:28
Просмотров 122 тыс.
Vue explained to React Developers in 6 mins
6:33
Просмотров 43 тыс.
Coding Shorts: Pinia for Vue 3: A Better Vuex?
19:05
Просмотров 3,4 тыс.
ChatGPT-o1 Created A Programming Language...
19:45
Просмотров 72 тыс.
iPhone Standby mode dock, designed with @overwerk
0:27
Wireless switch part 177
0:58
Просмотров 4,8 млн