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
// NOTE: Code below is not production grade, just pseudo-code
// Sync across tabs
const handleStorageChange = (event: StorageEvent) => {
if (event.key === key && event.newValue != null) {
setSelf(JSON.parse(event.newValue)[node.key]);
}
};
window.addEventListener('storage', handleStorageChange);
return () => {
window.removeEventListener('storage', handleStorageChange);
};
would ensure that changes made to node.key in another browser tab would be picked up.
As localStorage supports this behavior, I believe it is fair to expect that recoil-persist would also handle it. Thx!
The text was updated successfully, but these errors were encountered:
Adding something like:
would ensure that changes made to
node.key
in another browser tab would be picked up.As localStorage supports this behavior, I believe it is fair to expect that recoil-persist would also handle it. Thx!
The text was updated successfully, but these errors were encountered: