function useRemoveEmail(mutationArgs?): UseRemoveEmailResult;Defined in: account-kit/react/src/hooks/useRemoveEmail.ts:44
A custom hook to handle the removal of an email from an already authenticated account, which includes executing a mutation with optional parameters.
import { useRemoveEmail } from "@account-kit/react";
const { removeEmail, isRemovingEmail, error } = useRemoveEmail({
// these are optional
onSuccess: () => {
// do something on success
},
onError: (error) => console.error(error),
});| Parameter | Type | Description |
|---|---|---|
|
| Optional arguments for the mutation used for removing an email. |
An object containing the removeEmail function, removeEmailAsync for async execution, a boolean isRemovingEmail to track the mutation status, and any error encountered.