# PollContext

The `PollContext` is provided by the [`Poll`](/chat/docs/sdk/react-native/v6/ui-components/poll/) component. If you are not familiar with React Context API, please read about it on [React docs](https://reactjs.org/docs/context.html).

The `PollContext` needs to be used within the [`Channel` component](/chat/docs/sdk/react-native/v6/core-components/channel/) as it depends on various values provided by it in order to work.

## Basic Usage

The `PollContext` can be consumed by any of the child components of `Channel` as following:

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

const value = useContext(PollContext);
```

Alternatively, you can also use the `usePollContext` hook provided by library to consume `PollContext`.

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

const value = usePollContext();
```

## Value

### message

<partial id="chat-sdk/react-native/v6/_partials/common-content/contexts/message-context/message"></partial>

### `poll` \*

<partial id="chat-sdk/react-native/v6/_partials/common-content/contexts/poll-context/poll"></partial>

---

This page was last updated at 2025-08-19T14:51:59.006Z.

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