# PaginatedMessageListContext

`PaginatedMessageListContext` is provided by [`Channel`](/chat/docs/sdk/react-native/v5/core-components/channel/) 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

`PaginatedMessageListContext` can be consumed by any of the child component of `Channel` component as following:

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

const { loadingMore, loadMoreRecent, messages } = useContext(
  PaginatedMessageListContext,
);
```

Alternatively, you can also use `usePaginatedMessageListContext` hook provided by library to consume PaginatedMessageListContext.

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

const { loadingMore, loadMoreRecent, messages } =
  usePaginatedMessageListContext();
```

## Value

### hasNoMoreRecentMessagesToLoad

True if `Channel` has loaded all the recent messages and there no more to load.

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

### `hasMore`

False if `Channel` has loaded all the messages in history, via pagination. Channel component uses this value to decide if more messages should be queried from server when user reaches top of the `MessageList`.

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

### `loadingMore`

True if `Channel` is querying more messages in the past from server, as part of pagination logic. `MessageList` component uses this value to display or hide inline loading indicator at top of the list.

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

### loadingMoreRecent

True if `Channel` is querying more recent messages from server, as part of pagination logic. `MessageList` component uses this value to display or hide inline loading indicator at bottom of the list.

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

### `loadMore`

Function to load more messages before the top message in list. This function gets called from `onScroll` handler of underlying `FlatList`, when scroll reaches top of the list and [`hasMore`](#hasmore) is true.

| Type     |
| -------- |
| function |

### loadMoreRecent

Function to load more messages before the top message in list. This function gets called from `onScroll` handler of underlying `FlatList`, when scroll reaches top of the list and [`hasMoreRecent`](#hasmorerecent) is true.

| Type     |
| -------- |
| function |

### messages

List of messages currently loading in channel.

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

### setLoadingMore

Setter function for [`loadingMore`](#loadingmore)

| Type                    |
| ----------------------- |
| `(loadingMore) => void` |

### setLoadingMoreRecent

Setter function for [`loadingMoreRecent`](#loadingmorerecent)

| Type                          |
| ----------------------------- |
| `(loadingMoreRecent) => void` |


---

This page was last updated at 2026-03-06T17:05:32.833Z.

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