# 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

Message object.

| Type           |
| -------------- |
| `Message` type |


### `poll` \*

An instance of the [`Poll` class](https://github.com/GetStream/stream-chat-js/blob/master/src/poll.ts) containing reactive state.

It is used by the underlying `usePollContext`, `usePollStateStore` and `usePollState` hooks to provide us with the reactive `Poll` state.

<admonition type="note">

If you need the `Poll` instance you may get it from `client.polls.fromState(pollId)`.

</admonition>

| Type   |
| ------ |
| object |



---

This page was last updated at 2026-05-13T13:38:47.026Z.

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/).