You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Individual keys do not have specific change events associated with them.
The idea behind exposing every property (key names and key values) is so that you can determine what's important to monitor.
In your example, you specify the key you'd like to watch, but this does not require exposing a custom event handler just for that key. You can easily accomplish this level of monitoring with logic inserted into the suggested nowICanSeeLocalStorageChangeEvents function.
Just grab e.detail.oldkey to see the key that changed, and nab e.detail.newval to see how it changed. You can monitor any key in the store this way.
So far, it is possible to listen to "any" change in the localStorage, like this :
But is it also possible to listen to a change of one property only ?
The text was updated successfully, but these errors were encountered: