News for hackers. Stuff that matters.
Re:Two custom React hooks by DangitBobby on Friday December 17, 2021 @11:34PM (#29601685)
I have a custom hook that I like to use called useLocalStorage which is just a wrapper around useState which first looks for existing state in localStorage. There is a defaultState argument if there's nothing in localStorage.

There are no comments on this comment yet.