useLogout

Hook for signing out of a wallet after a user has logged in using useLogin

Example

import { useLogout } from "@thirdweb-dev/react";
function App() {
const { logout, isLoading } = useLogout();
return (
<button onClick={() => logout()}>
{isLoading ? "Logging out..." : "Logout"}
</button>
);
}

Returns

object containing a logout function and an isLoading state that indicates if the logout request is in progress