How to persist the shopping cart state to local storage

preview_player
Показать описание
How to persist the shopping cart state to local storage

------------

For those who don't know, I'm a full stack web developer who has been in the industry for over 5 years now. There is a lot of things I have learned along the way and I'd like to share that knowledge with anyone wanting to learn!

like this video if you found it useful and would like to see more videos of the same content.

subscribe to my channel if you are trying to improve your abilities as a web developer, software engineer, or even if you are just learning to code.

Don't forget to turn on those bell notifications!

Book mark these links!
Рекомендации по теме
Комментарии
Автор

Exactly what I was looking for. Thanks for this great tutorial!

yogajourney
Автор

This helped me a lot, I was watching other tutorials, but they didn't work as needed, this was spot on and very easy, thank You!!!!

atomas
Автор

Thaank you, 3 days whit the same issue, and I find your 4mins video and thats it, genius

TheEstebansanto
Автор

Simple and straight forward! You are the best <3

joemar
Автор

Spending 3 days for this and now I get it, Thank you.

artalfredcacanindin
Автор

Simplest, easiest... Exactly what I was looking for. Thanks dude !

doriantheo
Автор

Wow thanks man this worked I tried a bunch of other tutorials and such for over 4 hours and this worked thank you. Before I had the const part inside a useffect that would get the data it was updating live and in the local storage but it kept ending up reverting to my default value after I refreshed. I guess putting the line 9 code you had and clearing my hardcoded state worked.

GinjouArmy
Автор

The best, simplest tutorial to the point. Thank you!

masaorel
Автор

Thanks, nice little snippet of practical code!

dmitryn
Автор

The video is very helpful! Thanks a lot!

vudlvnl
Автор

AYYEE E THANKS MAN I WAS GETTING ANNOYED BY THIS FOR SO LONG

lazyplayer
Автор

Thank you so much for this. Just what i needed in time 🙏🏾

omowayeosmund
Автор

Is not good to put Array in dependencies because Effect re-run if one of dependencies is Object or Function or Array

ahmrfjamali
Автор

Just what I needed it right now, thanks

danycorea
Автор

Thank you, this did the trick for me.

jesse-leonard
Автор

I love this! But what if I wanted to persist the data pe session. SessionStorage can't be shared across tabs right? And local storage can be but it doesn't clear when the window is closed ... 🤔

jabeztadesse
Автор

Hi, i´m from Brazil, thanks you for video

marcoshamil
Автор

Amazing tutorial bro! Very helpful!!!!

prashoonbhattacharjee
Автор

Perfect! very useful. Thank you for posting!

salamina_
Автор

Can't get why is my local storage sets item only after the second click

IAMSHEVCHUK