Well, then you're too quick to dismiss the awesome feature useLocalStorage brings just because the code snippet doesn't fully demonstrate it 🤷
Imagine if you have 10 components on the page that use the same local storage value. I rather import useLocalStorage than reimplement the mechanism to listen for changes
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Well, then you're too quick to dismiss the awesome feature
useLocalStorage
brings just because the code snippet doesn't fully demonstrate it 🤷Imagine if you have 10 components on the page that use the same local storage value. I rather import
useLocalStorage
than reimplement the mechanism to listen for changes