Тёмный
No video :(

3 Ways to Persist Pinia State 

LearnVue
Подписаться 46 тыс.
Просмотров 53 тыс.
50% 1

A common use case for all data stores is the need to persist data. In this video, we'll see a few different approaches to achieve this from coding it ourselves to using some of the Pinia plugins built by the Vue community.
LINKS
Last Pinia Video: • Create a Pinia Store w...
github.com/vue...
github.com/pra...
✅ FREE VUE 3 CHEATSHEET WITH ESSENTIAL CODE SNIPPETS
learnvue.co/vu...
follow me on twitter:
/ mattmaribojoc
🚨 Like quick Vue lessons like these? Check out 800+ lessons over on Vue School - go.learnvue.co...
Music by Lukrembo

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

 

28 авг 2024

Поделиться:

Ссылка:

Скачать:

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

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 54   
@ZynthProductions
@ZynthProductions 2 года назад
what a timing. man! your timing is always on point on me.
@caiovinicius7871
@caiovinicius7871 2 года назад
For me too, those videos are literally JIT.
@ZynthProductions
@ZynthProductions 2 года назад
@@caiovinicius7871 lol nice one 😂
@PureAlbania
@PureAlbania 2 года назад
Thanks. Nice showing the various ways.
@codybontecou
@codybontecou 2 года назад
Nice stuff. I'm glad it's so simple and straightforward.
@chiragbhardwaj7074
@chiragbhardwaj7074 Год назад
You sir have made my day. been stuck on this for hours!
@trayto100
@trayto100 Месяц назад
Nice explanation. On the other hand, I can't understand why not directly using localstorage in your standard functions in this situation. I was hoping to persist data under the rags since I dont want a user to inspect or possibly change the data from local.
@xarunoba7448
@xarunoba7448 2 года назад
Your videos are very helpful! Is there any possibility on having a tutorial for SSR with Vue 3?
@musha3368
@musha3368 2 года назад
++
@mangtri9680
@mangtri9680 2 года назад
Short and clear explanation. Thanks!
@mez_mez
@mez_mez Месяц назад
nice video and great explanation. thank you.
@Therealskythe
@Therealskythe 2 года назад
How on earth does Pinia not persist by default? Sometimes I dont understand what devs are doing.
@SamuelEiche
@SamuelEiche Год назад
Why would you want to persist everything?
@buckwheatplate8770
@buckwheatplate8770 2 года назад
You channel is like a gem. Thanks for really cool vids
@hichembouallegue
@hichembouallegue 2 года назад
useLocalStorage is my favorite one
@s0up_dev
@s0up_dev 2 года назад
3:17 Why do we need an arrow function here?
@Casb02
@Casb02 2 года назад
Vue use is my favourite version, it is so easy to use
@petertichelaar8125
@petertichelaar8125 Год назад
thank you for your straight to the point approach
@yothebob8162
@yothebob8162 Год назад
Thank you, that was way clearer then the pinia docs lol
@mikopiko
@mikopiko Год назад
Short & concise
@ChristopherFranko
@ChristopherFranko 2 года назад
First off, I love these videos. They are very informative and incredibly helpful. The presenter though is using a monotone, laundry listing speech pattern that takes away from the content at times.
@LearnVue
@LearnVue 2 года назад
thanks for the tip - im working on it!
@ChristopherFranko
@ChristopherFranko 2 года назад
@@LearnVue Yea man! I love your videos and the content in this one specifically is great since most of the pinia videos are for TS. If you could make one or have made one for pinia using the options api that would be hype af.
@MW-fm1qq
@MW-fm1qq 2 года назад
Great video! It saves me for my course project, thanks for sharing!
@LearnVue
@LearnVue 2 года назад
glad it helped!
@bakr0x
@bakr0x 11 месяцев назад
Great stuff man, how will you recommend I protect again users directly modifying the localStorage object though, any suggestions on perhaps any other alternative persistence options to use that's more secure ?
@AngryBacteria
@AngryBacteria Год назад
With the VueUse, do you really need to wrap it in a ref? According to their docs the function already returns a ref
@warrior_dev
@warrior_dev 2 года назад
Really useful, thanks 🔥
@PetrFaitl
@PetrFaitl Год назад
It would be great to see examples of persistent storage with Nuxt3, without hydration issues. I've made use of the VueUse composable, but even with the example solution using hydration function, I get hydration mismatch in the console. Not sure if to worry about it, but it would be better not to see the issue. Any ideas? Thanks
@eduardocarrilloalbor9459
@eduardocarrilloalbor9459 Год назад
I use Nuxt3 too, but I have a different issue, on reload, everything it resets, does that also happen to you?
@waterblurr
@waterblurr Год назад
@@eduardocarrilloalbor9459 This happens to me as well
@kirill-petrov
@kirill-petrov 10 месяцев назад
nice!! piniaPluginPersistedstate good choice
@rodrigobranco4472
@rodrigobranco4472 Год назад
great video, GOD bless you!!
@thulas-mkhwanazi
@thulas-mkhwanazi 2 года назад
Great video as always. I noticed in your videos that you don't use Typescript, is there any reason for not using it?
@andibachtiar8788
@andibachtiar8788 2 года назад
maybe beacuse javascript is more common than typescript
@pyropony171
@pyropony171 11 месяцев назад
thanks that was agood quick reference
@676005ga
@676005ga 2 года назад
I have two questions: 1. If we use the first way, do we register a new watcher whenever we call useUserStore? 2. How to reset states when user log out? Thanks for making awesome content!
@hyggedev2124
@hyggedev2124 2 года назад
As a React dev, I'm getting jelly
@Imaginativeone_DF
@Imaginativeone_DF 2 года назад
How do I persist a Pinia Store to SQLite? Ideally, I'd like to be able to query the Pinia store data within the SQLite database.
@ThEReAlCrAnTlY
@ThEReAlCrAnTlY Год назад
Great video!
@renepardon7435
@renepardon7435 2 года назад
my favorite way would be to persist with sqlite3 - you have an idea what would be the best way to implement? or do i have to do something customized for that with knex or sequelize?
@modelarzjakub
@modelarzjakub Год назад
Is localstorage option work with TS? Actually I tried all options and it doesn't work i any way. Can someone help me please?
@jessicaryan9820
@jessicaryan9820 2 года назад
thank you bru!!
@shadkamel362
@shadkamel362 2 года назад
hey, i need a vue promise tracker, does any body know some thing or tool to i do for all over the project? thanks.
@xxwaldi
@xxwaldi 2 года назад
amazing.
@thabo5799
@thabo5799 2 года назад
Hey, can you make a video explaining why Pinia is supposedly better than vuex?
@adinepamungkas
@adinepamungkas 2 года назад
Mantap jiwa raga bang...!!! Jozzz
@irfnrdh
@irfnrdh Год назад
asik asik
@RootsterAnon
@RootsterAnon 2 года назад
I have so much problem with Nuxt 3 and pinia persisted state. Anyone have some git or repo I can check out. I don't have errors but my state is still not saved. --> Solution in comments
@juanalbertoboada
@juanalbertoboada Год назад
Hi @Rootster , I am having the same issue, could you make it work?
@chrischambless
@chrischambless 6 месяцев назад
I appreciate you keeping your content short and sweet, but you could work on varying the inflection of your voice to get your ideas across better. I would describe your manner of speaking as droning or monotone. Every sentence sounds the same, especially the last word of every sentence. And you sound bored. Work on that and your channel will be better.
@hammadasif
@hammadasif 2 года назад
Well, IMO useLocalStorage gives you the cleanest and most minimalistic approach, also, @vueuse provides a ton of other good utils
Далее
The Pinia Crash Course
34:40
Просмотров 16 тыс.
The Most Legendary Programmers Of All Time
11:49
Просмотров 552 тыс.
Learn Pinia Setup Stores in 30 MINUTES! (Vue JS 3)
33:41
Why you should use useState()
17:57
Просмотров 16 тыс.
Pinia Simplified
4:28
Просмотров 121 тыс.
You're Probably Using Nuxt Wrong
5:16
Просмотров 21 тыс.
I've been using Redis wrong this whole time...
20:53
Просмотров 354 тыс.
Turns out REST APIs weren't the answer (and that's OK!)
10:38
Persist Pinia State between Page Reloads
7:56
Просмотров 13 тыс.
The Secret Science of Perfect Spacing
9:40
Просмотров 408 тыс.