Skip to content

Tag: nuxtjs

localstorage.getItem() not working in NUXT JS

I am trying to develop a shopping cart with nuxt js. I am successfully storing the cart data in local storage but I am unable to retrieve the data. N.B: i don’t wanna use vuex-persistedstate. Answer I see lots of small problems with this. First of all, it looks like you’ve put addToCart and saveIn…

Find a specific object in an array of objects

I don’t understand because I use the method “find” but I get “undefined”… My data : I would like to have only the object with the ID 2 for example. So I wrote : But it does not work… I always get “undefined” Thanks for help Answer ID is a number, therefore…