Back to Browse

Custom React Local Storage Hook

5.2K views
Nov 11, 2020
11:11

In this video we'll create a custom hook that will write our state to local storage, and initialize it based on what is in local storage. This can be used to remember what the user has placed into state, without needing to write it to some sort of backend in a database. If you become a member prior to the course launching you will get the course for free! https://www.youtube.com/channel/UCWPY8W-FAZ2HdDiJp2RC_sQ/join ---------- Links Source Code - https://github.com/leighhalliday/use-local-state-demo ---------- Connect Join this channel - https://www.youtube.com/channel/UCWPY8W-FAZ2HdDiJp2RC_sQ/join Join me on Discord - https://discord.gg/wcSNwfu ---------- Timeline 00:00 - Introduction 03:20 - Creating useLocalState hook 05:20 - Writing to Local Storage 07:20 - Reading from Local Storage

Download

1 formats

Video Formats

360pmp417.8 MB

Right-click 'Download' and select 'Save Link As' if the file opens in a new tab.

Custom React Local Storage Hook | NatokHD