If you know how to use Local Storage in Javascript. You'll know how to use Local Storage in React. Local Storage is a neat way to store data in your browser and persist state and more in your React Application. Without the need for a database or similar.
In this video I'll show you how to create a custom React Hook for Local Storage. It's going to be a reusable hook that you can use everywhere in your React Application.
Typescript and React is also a great combination so I'm going to be using Typescript for this one.
I'll show you, from scratch, how to use a custom hook in React to utilize localstorage for persisting data.
Finished code: https://github.com/weibenfalk/Local-S...
Support me by subscribing to this channel ❤️
Do you want to master #react, #gatsby, or #svelte fast? ⏩ 🚀 👩🚀
Check out my premium courses at https://www.weibenfalk.com
—
Find me somewhere below:
Website: https://www.weibenfalk.com
Udemy: https://www.udemy.com/user/thomas-928/
Linkedin: / thomas-weibenfalk-76356611
Twitter: / weibenfalk
Github: https://github.com/weibenfalk
FreeCodeCamp: https://www.freecodecamp.org/news/aut...
Dev.to: https://dev.to/weibenfalk