import { Meta } from '@storybook/blocks';

<Meta title="SDK Hooks/useMeetingStatus" />

# useMeetingStatus

The `useMeetingStatus` hook returns the meeting status from the enum below.

```javascript
enum MeetingStatus {
  Loading,
  Succeeded,
  Failed,
  Ended,
  JoinedFromAnotherDevice,
  Left,
  TerminalFailure,
  Reconnecting,
}
```

### Return Value

```javascript
meetingStatus: MeetingStatus;
```

## Importing

```javascript
import { useMeetingStatus } from 'amazon-chime-sdk-component-library-react';
```

## Usage

The hook depends on the `MeetingProvider`.

```jsx
import React from 'react';
import {
  MeetingProvider,
  useMeetingStatus,
} from 'amazon-chime-sdk-component-library-react';

const App = () => (
  <MeetingProvider>
    <MyChild />
  </MeetingProvider>
);

const MyChild = () => {
  const meetingStatus = useMeetingStatus();

  return <p>Meeting Status: {meetingStatus}</p>;
};
```

### Dependencies

- `MeetingProvider`
