# useTableFolders

**Category:** Base Components/Collections/TableFolders/useTableFolders

## API

### Description

`useTableFolders` is a React hook designed to facilitate the management of the [`TableFolders`](./?path=/story/base-components-collections-tablefolders-tablefolders--tablefolders) component.It returns a [`TableFoldersState`](./?path=/story/base-components-collections-tablefolders-tablefoldersstate--tablefoldersstate) to pass to the `state` prop of the `TableFolders` component.

```tsx
import { useTableFolders } from '@wix/patterns';
```

### Returns

[TableFoldersState](./?path=/story/base-components-collections-tablefolders-tablefoldersstate--tablefoldersstate)

### Props

| Prop | Type | Required | Default | Description |
|------|------|----------|---------|-------------|
| `items` | `CollectionState<T1, F1>` | Yes | - | A [collection state](./?path=/story/common-hooks--usecollection) that fetches items |
| `folders` | `CollectionState<T2, F2>` | Yes | - | A [collection state](./?path=/story/common-hooks--usecollection) that fetches folders |

