> Documentation index: https://www.gooddata.ai/docs/gooddata-ui/llms.txt lists every page of these docs as Markdown.

# usePlaceholder()

- Package: [@gooddata/sdk-ui](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui/index.md)
- Kind: function
- Source: https://github.com/gooddata/gooddata-ui-sdk/blob/rel/11.64/libs/sdk-ui/src/base/react/placeholders/hooks.ts

React hook to obtain/set placeholder value.

**Signature:**

```typescript
export declare function usePlaceholder<T extends IPlaceholder<any>>(placeholder?: T): [
    PlaceholderValue<T> | undefined,
    (valueOrUpdateCallback: ValueOrUpdateCallback<PlaceholderValue<T> | undefined>) => void
];
```

## Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| placeholder | T | _(Optional)_ |

**Returns:**

[ [PlaceholderValue](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui/sdk-ui.placeholdervalue/index.md)&lt;T&gt; &#124; undefined, (valueOrUpdateCallback: ValueOrUpdateCallback&lt;[PlaceholderValue](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui/sdk-ui.placeholdervalue/index.md)&lt;T&gt; &#124; undefined&gt;) =&gt; void ]

## Remarks

See [IPlaceholder](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui/sdk-ui.iplaceholder/index.md).

Note: When placeholder is not provided, setting its value will result in the error.
