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>
);
}

Returns

An object with a function to disconnect an account