# useUser | @account-kit/react

> Overview of the useUser 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 useUser(): UseUserResult;
```

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

A React [hook](https://github.com/alchemyplatform/aa-sdk/blob/main/account-kit/react/src/hooks/useUser.ts) that returns the current user information, either from an External Owned Account (EOA) or from the client store. It uses the Alchemy account context and synchronizes with external store updates.
The best way to check if user is logged in for both smart account contract users and EOA.

If using smart contract account, returns address of the signer. If only using smart account contracts then you can use [useSignerStatus](https://www.alchemy.com/docs/wallets/reference/account-kit/react/hooks/useSignerStatus#usesignerstatus) or [useAccount](https://www.alchemy.com/docs/wallets/reference/account-kit/react/hooks/useAccount#useaccount) to see if the account is defined.

## Example

```ts twoslash
import { useUser } from "@account-kit/react";
import type { User } from "@account-kit/signer";
type UseUserResult = (User & { type: "eoa" | "sca" }) | null;

const user = useUser();
```

## Returns

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

The user information, including address, orgId, userId, and type. If the user is not connected, it returns null. [ref](https://github.com/alchemyplatform/aa-sdk/blob/main/account-kit/react/src/hooks/useUser.ts#L9)