Actually it is possible (see Window: storage event) Is it what you're looking for? 🤔
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.
settings.sound
Ok I got you, and you're right, it would be useful. In that case, I think I'd go with the useContext hook.
useContext
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
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.
Actually it is possible (see Window: storage event)
Is it what you're looking for? 🤔
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.Ok I got you, and you're right, it would be useful. In that case, I think I'd go with the
useContext
hook.