DEV Community

Discussion on: Custom React Hooks: useLocalStorage

link2twenty profile image
Andrew Bone

I think that only applies if another session makes the change.

I was more thinking component-A makes a change to settings.sound and component-B has an event listener that means it can see the change without having to drill props.

Thread Thread
iamludal profile image
Ludal 🚀 Author • Edited on

Ok I got you, and you're right, it would be useful. In that case, I think I'd go with the useContext hook.