Josh Comeau personal blog
Persisting React State in LocalStorage
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!
- Points
- 137
- HN comments
- 64
- Submissions
- 1
- Cited by
- 0 commenters
Web & FrontendSoftware Engineering2020
On Hacker News
| Submitted | Title on HN | Points | Comments |
|---|---|---|---|
| Feb 28, 2020 | Persisting React State in LocalStorage by joshwcomeau | 137 | 64 |