# useAccount

## Description

This hook provides an easy way to access the current status and information of a smart account in a React application, providing essential details such as the smart account address, client instance, and connection status.&#x20;

## Returns

* `address` (Address | undefined)
* `smartAccountClient` (ContextComethSmartAccountClient | null)
* `isConnected` (boolean)
* `isDisconnected` (boolean)
* `status` (AccountStatus)

## Example

```tsx
import React from 'react';
import { useAccount } from "@cometh/connect-react-hooks";

const AccountInfo = () => {
  const { address, isConnected, status } = useAccount();

  return (
    <div>
      <h1>Account Information</h1>
      <p>Status: {status}</p>
      {isConnected ? (
        <p>Connected to account: {address}</p>
      ) : (
        <p>No account connected</p>
      )}
    </div>
  );
};

export default AccountInfo;

```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.cometh.io/integrations/react-hooks/useaccount.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
