---
title: useCurrentUser
description: >-
  The useCurrentUser hook fetches the Shop app user's profile information
  including display name and avatar image URL.
source_url:
  html: 'https://shopify.dev/docs/api/shop-minis/hooks/user/usecurrentuser'
  md: 'https://shopify.dev/docs/api/shop-minis/hooks/user/usecurrentuser.md'
---

# useCurrentUser

The `useCurrentUser` hook fetches the Shop app user's profile information including display name and avatar image URL. Use this for personalizing the UI, displaying user info in headers/profiles, or conditionally showing features based on authentication status.

**Caution:**

This hook requires adding the following scopes to the manifest file:

`user_settings:read`

For more details, see [manifest.json](https://shopify.dev/docs/api/shop-minis/manifest-file).

## use​Current​User(**[params](#usecurrentusergeneratedtype-propertydetail-params)**​)

### Parameters

* **params**

  **UseCurrentUserParams**

### Returns

* **UseCurrentUserReturns**

### UseCurrentUserParams

* fetchPolicy

  ```ts
  DataHookFetchPolicy
  ```

* skip

  ```ts
  boolean
  ```

### DataHookFetchPolicy

```ts
'cache-first' | 'network-only'
```

### UseCurrentUserReturns

* currentUser

  The current user logged into Shop.

  ```ts
  UserProfile | null
  ```

* error

  ```ts
  Error | null
  ```

* loading

  ```ts
  boolean
  ```

* refetch

  ```ts
  () => Promise<void>
  ```

### UserProfile

* avatarImage

  ```ts
  {
      url: string
    } | null
  ```

* displayName

  ```ts
  string | null
  ```

Examples

### Examples

* ####

  ##### tsx

  ```tsx
  import {useCurrentUser} from '@shopify/shop-minis-react'

  export default function MyComponent() {
    const {currentUser, loading, error} = useCurrentUser()

    if (loading) {
      return <p>Loading user...</p>
    }

    if (error) {
      return <p>Unable to load user</p>
    }

    if (!currentUser) {
      return <p>No user found</p>
    }

    return <p>Hi, {currentUser.displayName}</p>
  }
  ```

***
