# useSolanaConnection | @account-kit/react

> Overview of the useSolanaConnection 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 useSolanaConnection(opts): SolanaConnection;
```

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

This hook is used for establishing a connection to Solana and returns the connection object and the signer object.

## Example

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

const { connection } = useSolanaConnection();
```

## Parameters

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

  <tbody>
    <tr>
      <td>
        `opts`
      </td>

      <td>
        `SolanaConnectionHookParams`
      </td>

      <td>
        Options for the hook to get setup
      </td>
    </tr>

  </tbody>
</table>

## Returns

[`SolanaConnection`](../interfaces/SolanaConnection)

The transaction hook.