My Learning Curve

Feed / Josh Comeau's blog

Persisting React State in localStorage

Monday, February 24, 2020

A common thing in React development is that we want to store a bit of React state in localStorage, and re-initialize from that value on the next page-load. This quick tutorial shows you how we can build a custom hook that does exactly this!

Keep reading.


Read original article ↗