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
constuseOpts=createPersistedState('key');constComp=props=>{const[opts,setOpts]=useOpts({show: false});useEffect(()=>{if(opts.show){console.log('Show');}else{console.log('Hide');}if(opts._originDoc===document){console.log('Origin was from this tab');}else{console.log('Origin of update was from another tab');}},[opts.show])return(<>Test</>);}
The text was updated successfully, but these errors were encountered:
Yes, there is a way to find out if it came from this tab or another but we don't have the code to pass it back to you, maybe if you tell me your use-case we could change it.
For example:
The text was updated successfully, but these errors were encountered: