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

# useRecordingInstances

> useRecordingInstances returns an array of all recording instance states.

<Badge color="blue">Paid plans only</Badge>

`useRecordingInstances(): RecordingInstanceState[]`

This is useful when working with [multi-instance recording](/docs/guides/features/live-streaming/multi-instance) to enumerate and display all active (and recently stopped) recording instances.

## Return value

An array of `RecordingInstanceState` objects, each with the following properties:

<ResponseField name="error" type="boolean">
  `true` if this instance encountered a recording error.
</ResponseField>

<ResponseField name="errorMsg" type="string">
  Error message for this instance, if any.
</ResponseField>

<ResponseField name="instanceId" type="string">
  The unique identifier for this recording instance.
</ResponseField>

<ResponseField name="isLocalParticipantRecorded" type="boolean">
  Whether the local participant is recorded by this instance.
</ResponseField>

<ResponseField name="isRecording" type="boolean">
  Whether this instance is currently recording.
</ResponseField>

<ResponseField name="layout" type="Object">
  The recording layout configuration for this instance.
</ResponseField>

<ResponseField name="local" type="boolean">
  `true` if this is a local recording.
</ResponseField>

<ResponseField name="recordingId" type="string">
  The recording ID for this instance.
</ResponseField>

<ResponseField name="recordingStartedDate" type="Date">
  When this instance started recording.
</ResponseField>

<ResponseField name="startedBy" type="string">
  The session ID of the participant who started this recording.
</ResponseField>

<ResponseField name="type" type="string">
  The recording type (e.g., `'cloud'`, `'local'`).
</ResponseField>

## Example

```jsx theme={null}
import { useRecordingInstances } from '@daily-co/daily-react';

export const RecordingInstancesList = () => {
  const instances = useRecordingInstances();

  if (instances.length === 0) {
    return <div>No recordings</div>;
  }

  return (
    <ul>
      {instances.map((instance) => (
        <li key={instance.instanceId}>
          {instance.instanceId}:{' '}
          {instance.isRecording ? 'Recording' : 'Stopped'}
          {instance.layout?.preset && ` (${instance.layout.preset})`}
        </li>
      ))}
    </ul>
  );
};
```

## See also

<CardGroup>
  <Card title="Hooks" icon="code" iconType="solid">
    * [useRecording()](/reference/daily-react/use-recording)
  </Card>

  <Card title="Guides" icon="book-open" iconType="solid">
    * [Multi-instance live streaming and recording guide](/docs/guides/features/live-streaming/multi-instance)
  </Card>
</CardGroup>
