Skip to main content

useConnectWallet

The useConnectWallet hook is a mutation hook for disconnecting from an active wallet connection, if currently connected.

import { ConnectButton, useDisconnectWallet } from '@iota/dapp-kit';

function MyComponent() {
const { mutate: disconnect } = useDisconnectWallet();
return (
<div>
<ConnectButton />

<button onClick={() => disconnect()}>Disconnect</button>
</div>
);
}

Example

Arguments

There are no arguments for useConnectWallet.