# useExportAccount | @account-kit/react

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

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

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

```ts
function useExportAccount(args?): UseExportAccountResult;
```

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

A [hook](https://github.com/alchemyplatform/aa-sdk/blob/main/account-kit/react/src/hooks/useExportAccount.ts) used to export the private key for an account. It returns the mutation functions to kick off the export process, as well as a component to render the account recovery details in an iframe.
What is returned is dependent on what you used most recently used to authenticate. If your session was initiated with a passkey, then a private key is returned. Otherwise, a seed phrase.

## Example

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

const {
  exportAccount,
  isExported,
  isExporting,
  error,
  ExportAccountComponent,
} = useExportAccount({
  params: {
    iframeContainerId: "my-iframe-container",
  },
});
```

## Parameters

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

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

      <td>
        [`UseExportAccountMutationArgs`](../type-aliases/UseExportAccountMutationArgs)
      </td>

      <td>
        Optional arguments for the mutation and export parameters. [ref](https://github.com/alchemyplatform/aa-sdk/blob/main/account-kit/react/src/hooks/useExportAccount.ts#L11)
      </td>
    </tr>

  </tbody>
</table>

## Returns

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

An object containing the export state, possible error, and the export account function and component. [ref](https://github.com/alchemyplatform/aa-sdk/blob/main/account-kit/react/src/hooks/useExportAccount.ts#L32)\*