# ChatContext

`ChatContext` is provided by [`Chat`](/chat/docs/sdk/react-native/v3/core-components/chat/) component. If you are not familiar with React Context API, please read about it on [React docs](https://reactjs.org/docs/context.html).

## Basic Usage

`ChatContext` can be consumed by any of the child component of `Chat` component as following:

```tsx
import { useContext } from "react";
import { ChatContext } from "stream-chat-react-native";

const { client, isOnline } = useContext(ChatContext);
```

Alternatively, you can also use `useChatContext` hook provided by library to consume ChatContext.

```tsx
import { useChatContext } from "stream-chat-react-native";

const { client, isOnline } = useChatContext();
```

## Value

### client

<partial id="chat-sdk/react-native/v3/_partials/common-content/core-components/chat/props/client"></partial>

### `connectionRecovering`

The value is true, when connection to WebSocket server is disconnected and is currently being recovered.

| Type    |
| ------- |
| boolean |

### `isOnline`

The value is true, when current user is connected to chat.

| Type    |
| ------- |
| boolean |

### `mutedUsers`

Array of users muted by current user.

| Type  |
| ----- |
| array |


---

This page was last updated at 2026-03-13T13:14:12.650Z.

For the most recent version of this documentation, visit [https://getstream.io/chat/docs/sdk/react-native/v3/contexts/chat-context/](https://getstream.io/chat/docs/sdk/react-native/v3/contexts/chat-context/).