3 Ways to Persist Pinia State

Поделиться
HTML-код
  • Опубликовано: 4 ноя 2024

Комментарии • 55

  • @ZynthProductions
    @ZynthProductions 2 года назад +6

    what a timing. man! your timing is always on point on me.

  • @PureAlbania
    @PureAlbania 2 года назад +3

    Thanks. Nice showing the various ways.

  • @codybontecou
    @codybontecou 2 года назад +8

    Nice stuff. I'm glad it's so simple and straightforward.

  • @chiragbhardwaj7074
    @chiragbhardwaj7074 Год назад +1

    You sir have made my day. been stuck on this for hours!

  • @bakr0x
    @bakr0x Год назад +1

    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 ?

  • @mangtri9680
    @mangtri9680 2 года назад +2

    Short and clear explanation. Thanks!

  • @trayto100
    @trayto100 3 месяца назад

    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.

  • @xarunoba
    @xarunoba 2 года назад +9

    Your videos are very helpful! Is there any possibility on having a tutorial for SSR with Vue 3?

  • @buckwheatplate8770
    @buckwheatplate8770 2 года назад +1

    You channel is like a gem. Thanks for really cool vids

  • @petertichelaar8125
    @petertichelaar8125 Год назад

    thank you for your straight to the point approach

  • @PetrFaitl
    @PetrFaitl Год назад +2

    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 Год назад +1

      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

  • @Casb02
    @Casb02 2 года назад

    Vue use is my favourite version, it is so easy to use

  • @hichembouallegue
    @hichembouallegue 2 года назад +1

    useLocalStorage is my favorite one

  • @s0up_dev
    @s0up_dev 2 года назад +3

    3:17 Why do we need an arrow function here?

  • @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?

  • @MW-fm1qq
    @MW-fm1qq 2 года назад +1

    Great video! It saves me for my course project, thanks for sharing!

    • @LearnVue
      @LearnVue  2 года назад +1

      glad it helped!

  • @AngryBacteria
    @AngryBacteria Год назад +1

    With the VueUse, do you really need to wrap it in a ref? According to their docs the function already returns a ref

  • @yothebob8162
    @yothebob8162 2 года назад

    Thank you, that was way clearer then the pinia docs lol

  • @mikopiko
    @mikopiko Год назад

    Short & concise

  • @mez_mez
    @mez_mez 4 месяца назад

    nice video and great explanation. thank you.

  • @ChristopherFranko
    @ChristopherFranko 2 года назад +1

    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 года назад +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.

  • @hyggedev2124
    @hyggedev2124 2 года назад +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.

  • @rodrigobranco4472
    @rodrigobranco4472 Год назад

    great video, GOD bless you!!

  • @warrior_dev
    @warrior_dev 2 года назад +2

    Really useful, thanks 🔥

  • @ThEReAlCrAnTlY
    @ThEReAlCrAnTlY Год назад

    Great video!

  • @kirill-petrov
    @kirill-petrov Год назад

    nice!! piniaPluginPersistedstate good choice

  • @pyropony171
    @pyropony171 Год назад

    thanks that was agood quick reference

  • @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?

  • @Therealskythe
    @Therealskythe 2 года назад +16

    How on earth does Pinia not persist by default? Sometimes I dont understand what devs are doing.

    • @SamuelEiche
      @SamuelEiche Год назад +2

      Why would you want to persist everything?

  • @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.

  • @thulas-mkhwanazi
    @thulas-mkhwanazi 2 года назад +1

    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

  • @OldenDays
    @OldenDays 2 года назад

    thanks a lot!

  • @jessicaryan9820
    @jessicaryan9820 2 года назад

    thank you bru!!

  • @thabo5799
    @thabo5799 2 года назад

    Hey, can you make a video explaining why Pinia is supposedly better than vuex?

  • @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!

  • @adinepamungkas
    @adinepamungkas 2 года назад

    Mantap jiwa raga bang...!!! Jozzz

    • @irfnrdh
      @irfnrdh 2 года назад

      asik asik

  • @xxwaldi
    @xxwaldi 2 года назад

    amazing.

  • @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 8 месяцев назад

    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 года назад +2

    Well, IMO useLocalStorage gives you the cleanest and most minimalistic approach, also, @vueuse provides a ton of other good utils