provider.on(event, handler) and unsubscribe with provider.removeListener (or its alias provider.off).
connect
useAccount() exposes the same signal through status.
disconnect
accountsChanged
chainChanged
wallet_switchEthereumChain or after the user changes the active chain in the popup.
Cleanup
Always remove listeners when your component or scope unmounts:useAccount(), useChainId(), and friends.