<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@datashaper/react](./react.md) &gt; [useColumnNamesList](./react.usecolumnnameslist.md)

## useColumnNamesList() function

Creates a list of column names for the table. If there are no columns supplied it will use the list from the table itself. Otherwise it will use the provided columns under the assumption the user has configured them as desired.

<b>Signature:</b>

```typescript
export declare function useColumnNamesList(table: ColumnTable, columns?: IColumn[]): string[];
```

## Parameters

|  Parameter | Type | Description |
|  --- | --- | --- |
|  table | ColumnTable |  |
|  columns | IColumn\[\] | <i>(Optional)</i> |

<b>Returns:</b>

string\[\]


