# useRemoveEmail | @account-kit/react

> Overview of the useRemoveEmail hook from @account-kit/react

{/* This file is auto-generated by TypeDoc. Do not edit manually. */}

```ts
function useRemoveEmail(mutationArgs?): UseRemoveEmailResult;
```

Defined in: [account-kit/react/src/hooks/useRemoveEmail.ts:44](https://github.com/alchemyplatform/aa-sdk/blob/main/account-kit/react/src/hooks/useRemoveEmail.ts#L44)

A custom hook to handle the removal of an email from an already authenticated account, which includes executing a mutation with optional parameters.

## Example

```ts twoslash
import { useRemoveEmail } from "@account-kit/react";

const { removeEmail, isRemovingEmail, error } = useRemoveEmail({
  // these are optional
  onSuccess: () => {
    // do something on success
  },
  onError: (error) => console.error(error),
});
```

## Parameters

<table>
  <thead>
    <tr>
      <th align="left">Parameter</th>
      <th align="left">Type</th>
      <th align="left">Description</th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>
        `mutationArgs?`
      </td>

      <td>
        `Partial`\<`Omit`\<`UseMutationOptions`\<`void`, `Error`, `void`, `unknown`>, `"mutationFn"` | `"mutationKey"`>>
      </td>

      <td>
        Optional arguments for the mutation used for removing an email.
      </td>
    </tr>

  </tbody>
</table>

## Returns

[`UseRemoveEmailResult`](../type-aliases/UseRemoveEmailResult)

An object containing the `removeEmail` function, `removeEmailAsync` for async execution, a boolean `isRemovingEmail` to track the mutation status, and any error encountered.