> ## Documentation Index
> Fetch the complete documentation index at: https://docs.towns.com/llms.txt
> Use this file to discover all available pages before exploring further.

# useSetDisplayName

Hook to set the display name of the current user in a stream.

## Imports

```ts theme={null}
import { useSetDisplayName } from '@towns-protocol/react-sdk'
```

## Definition

```ts theme={null}
function useSetDisplayName(
  streamId: string,
  config?: ActionConfig<Myself["setDisplayName"]>,
): {
    data: void | undefined;
    error: Error | undefined;
    isPending: boolean;
    isSuccess: boolean;
    isError: boolean;
    setDisplayName: (displayName: string) => Promise<void>;
}
```

**Source:** [useSetDisplayName](https://github.com/towns-protocol/towns/blob/main/packages/react-sdk/src/useMyMember.ts)

## Parameters

### streamId

* **Type:** `string`

The id of the stream to set the display name of.

### config

* **Type:** `ActionConfig<Myself["setDisplayName"]>`
* **Optional**

Configuration options for the action.

## Return Type

The `setDisplayName` action and its loading state.

```ts theme={null}
{
    data: void | undefined;
    error: Error | undefined;
    isPending: boolean;
    isSuccess: boolean;
    isError: boolean;
    setDisplayName: (displayName: string) => Promise<void>;
}
```
