# useConnect | @account-kit/react

> Overview of the useConnect 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 useConnect(params?): UseConnectReturnType<Config>;
```

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

Re-exported [wagmi hook](https://wagmi.sh/react/api/hooks/useConnect) for connecting an EOA. This hook
uses the internal wagmi config though so that the state
is in sync with the rest of the Alchemy Account hook state.
Useful if you want to connect to an EOA.

## Example

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

const { connectors, connect } = useConnect({
  // 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>
        `params?`
      </td>

      <td>
        `Object`
      </td>

      <td>
        mutation parameters to use for the connect mutation
      </td>
    </tr>

  </tbody>
</table>

## Returns

`UseConnectReturnType`\<`Config`>

the wagmi useConnect return type