useDisconnect

Disconnect from given account

Example

import { useDisconnect, useActiveWallet } from "thirdweb/react";
function Example() {
const { disconnect } = useDisconnect();
const wallet = useActiveWallet();
return (
<button onClick={() => disconnect(wallet)}>Disconnect</button>
);
}
function useDisconnect(): { disconnect: (wallet: Wallet) => void };

Returns

let returnType: { disconnect: (wallet: Wallet) => void };

An object with a function to disconnect an account