> ## 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.

# Connect

> Handle the connect event emitted when a user approves a connection request to your EVM dapp.

Event emitted upon connecting to a dapp.

```typescript theme={null}
interface connectionInfo {
  chainId: string;
}

window.ethereum.on('connect', (connectionInfo: connectionInfo) => {
      console.log(connectionInfo.chainId);
      // "0x1" On Ethereum
});
```

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