# PollContext

The `PollContext` is provided by the [`Poll`](/chat/docs/sdk/react-native/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/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/v8-latest/_partials/common-content/contexts/message-context/message"></partial>

### `poll` \*

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

---

This page was last updated at 2025-08-15T14:16:31.519Z.

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