Window: Storage Event💡 Ever needed to keep some data in sync between tabs? For example, the checkout page should always display the correct data - and this is where storage event comes in play. Below, you can see implementation examples for vanilla JavaScript and React.CodeJavaScriptconst updatedStorageCart = () => { console.log('check, check'); window.removeEventListener('storage', updatedStorageCart); }; window.addEventListener('storage', updatedStorageCart);ReactReact.useEffect(() => { const updatedStorageCart = () => { console.log('check, mate'); }; window.addEventListener('storage', updatedStorageCart); return () => { window.removeEventListener('storage', updatedStorageCart); }; }, []);Resourceshttps://developer.mozilla.org/en-US/docs/Web/API/Window/storage_event