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.
#react