function useLogout(mutationArgs?): UseLogoutResult;Defined in: account-kit/react/src/hooks/useLogout.ts:38
Provides a hook to log out a user, disconnecting the signer and triggering the disconnectAsync function. This will disconnect both EVM and Solana wallets.
import { useLogout } from "@account-kit/react";
const { logout, isLoggingOut, error } = useLogout({
// these are optional
onSuccess: () => {
// do something on success
},
onError: (error) => console.error(error),
});| Parameter | Type | Description |
|---|---|---|
|
| optional arguments to customize the mutation behavior |
an object containing the logout function, a boolean indicating if logout is in progress, and any error encountered during logout