> ## Documentation Index
> Fetch the complete documentation index at: https://docs.phantom.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Disconnect

> Handle the disconnect event emitted when Phantom loses its connection to the RPC provider.

Event emitted upon the wallet losing connection to the RPC provider.

This is **not** a user "disconnecting" from a dapp, or otherwise revoking access between the dapp and the wallet.

```typescript theme={null}
 window.ethereum.on('disconnect', () => {
      console.log('lost connection to the rpc')
});
```

You can see an example of [hooking into this event](https://github.com/phantom-labs/eth_sandbox/blob/main/src/App.tsx#L106-L112) in our sandbox.
