Use localStorage in a Vue App

Поділитися
Вставка
  • Опубліковано 7 лис 2024
  • In this video, we're going to use localStorage to persist some user data in a Vue.js note-taking application.
    We built this application from the ground up (well, almost) in my previous video. If you'd like to check that out, here's the link: • Build Your First Vue.j...
    If you just want to watch to see how to implement localStorage in Vue, that's fine too. Feel free to jump straight into this one.
    Here are some resources that might help as you watch:
    ❇️ The Vue.js site- vuejs.org/
    ❇️ Vue's documentation on lifecycle hooks- vuejs.org/v2/g...
    ❇️ MDN's guide to using localStorage- developer.mozi...
    ❇️ MDN documentation on the built-in JSON object- developer.mozi...
    ❇️ MDN documentation on console.log- developer.mozi...
    ❇️ Vue docs on watchers- vuejs.org/v2/g...

КОМЕНТАРІ • 34

  • @indigoxalis
    @indigoxalis 4 роки тому +13

    I'm a new developer trying to learn Vue and it's all super confusing to me. This is the first video that I could actually follow along and understand! Thank you for including the debugging as well, that really helped a lot! I'm definitely subscribing :) Will you be doing a video on $emit( ) and passing data between components?

    • @RadDevon
      @RadDevon  4 роки тому +3

      That's awesome to hear! I haven't currently planned any additional Vue videos, but it's something I would like to do in the future. I've been working with Vue a lot recently, so it would be a great technology for me to explore further in video.
      Thank you for your kind comment and for the sub!

  • @InaTenCa
    @InaTenCa 3 роки тому +2

    Thank you !!!
    I'm French, but I haven't found another youtuber who explains as well as you.
    Your videos are very helpful and very clear
    I love your videos, keep it up !!

  • @mudzingwajonah7378
    @mudzingwajonah7378 Рік тому

    I like how you demonstrated you debugging skill, this is real good to new students in the fields as it teaches one of the most crucial skills for an developer. keep it up.

  • @JuanRodriguez-gg2qz
    @JuanRodriguez-gg2qz 2 роки тому +2

    For those of this wondering, this still works in 2022. I used this in vuetify with a v-card object

  • @joan2296
    @joan2296 3 роки тому +2

    thank you so much. i love how you show us how you debug too

  • @johnsci911
    @johnsci911 2 роки тому +1

    Thanks this is exactly what I needed

  • @ayrtoncossa2534
    @ayrtoncossa2534 2 роки тому +1

    I found gold here 🔥. I was looking for a way to make an app with 2 inputs for my finance app and i found your notes app tutorial that will welp.then i found this way to use local storage 🤲😌

  • @lenux5828
    @lenux5828 3 роки тому +2

    exactly what i needed

  • @silenthill8312
    @silenthill8312 2 роки тому +1

    Thank you sir

  • @-indeed8285
    @-indeed8285 4 роки тому +3

    Thanks.. So much informative.

  • @RobHowdleMusic29
    @RobHowdleMusic29 3 роки тому +1

    Great! Tim Cook has left Apple to teach Vue, wonderful ;)

    • @RadDevon
      @RadDevon  3 роки тому +2

      😂 UA-cam, please make it possible to upvote a comment twice. I have an urgent need for this feature. Sincerely, Tim Cook.

  • @natarajana.v4262
    @natarajana.v4262 3 роки тому +1

    thanks a lot sir for this video. Liked and subscribed.

  • @kaiparado
    @kaiparado 3 роки тому +1

    Great video dude, thank you

  • @thamaragerig9587
    @thamaragerig9587 4 роки тому +3

    Thank you!!

  • @adityakadam2256
    @adityakadam2256 3 роки тому +1

    Is it a good practice to use Vuex and Localstorage together?

    • @RadDevon
      @RadDevon  3 роки тому +1

      Sure! Vuex makes it easy to get to your data across your entire app while LocalStorage lets you persist data on the user’s machine. They do different things and can definitely complement each other.

    • @adityakadam2256
      @adityakadam2256 3 роки тому +1

      @@RadDevon that’s perfect. Thanks a lot👍🏻

  • @sanjeewa247
    @sanjeewa247 4 роки тому +1

    Thank you very much, very helpful and very clear.

  • @fabienekoutesone6046
    @fabienekoutesone6046 3 роки тому +1

    Thanks u ......................

  • @joyantadutta6154
    @joyantadutta6154 3 роки тому +1

    Great

  • @crumb789
    @crumb789 2 роки тому

    лучший)

  • @misbahhasan6272
    @misbahhasan6272 Рік тому

    I have stored arrays in vuex I applied same sintex but it's not working. Please make video that how to store local storage in vuex. Or send me code

  • @abukhalidrifat3994
    @abukhalidrifat3994 4 роки тому +1

    How can I clear the data in localstorage on a button click?

    • @RadDevon
      @RadDevon  4 роки тому +1

      localStorage.clear() clears local storage. You would want to listen to the click event on your button. Here's a guide that might help: javascript.info/introduction-browser-events

  • @dualizeox9884
    @dualizeox9884 4 роки тому +1

    awesome :D

  • @glifbergs.1341
    @glifbergs.1341 2 роки тому

    You can filters or search a element using localstorage¿? How

    • @RadDevon
      @RadDevon  2 роки тому

      You can’t really do that using localstorage, but once you pull the data out of localstorage, you can do anything you want with it in Javascript, just like you would any other data. Sort, filter, search, transform… whatever your heart desires!