Add this code:
```
const { lockStatus, releaseLock } = useWebLock('lock');
React.useEffect(() => {
document.title = lockStatus;
if(lockStatus === 'should-release') {
// Add some delay to simulate closing the tunnelbroker socket
setTimeout(releaseLock, 1000);
}
}, [lockStatus]);
```
Try switching between different tabs quickly, try displaying two tabs at the same time. Check that at all times the only tab holding the lock is one of the tabs in the foreground (except for the 1s delay before call to `releaseLock`). Check that if no tab is selected the lock is released.