---
description: A simple interface for displaying messages in a room.
---

# MessageList

![](https://616286862-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MTF7IdPkeAGpsLzharB%2F-MVFjLSa3kzUlEG178-t%2F-MVFl07RbhOaQSswW9Tm%2Fimage.png?alt=media\&token=79e1c459-b249-4af4-bcc9-0f3f3a3deecc)

## Props

### room (required)

The Room for which you want to show messages.

### flatListProps

Additional props for the inner FlatList

### onPress

What happens when you press on a message.

### onLongPress

What happens when you long press on a message.

### renderTypingIndicator

Render a typing indicator below the message list. Default is null. Passes the following object as an argument:&#x20;

```
{
    list, // array of user IDs who are typing
    string // a string representing the users typing. i.e. "Annie and 2 others are typing..."
}
```

### renderMessage

Overrides the default message renderer. Immediately passed to FlatList, so you receive what you normally would from `renderItem` - most notably, `({ item, index })`

### renderLoader

A loader that appears at the top of the list when scrolling up to get new messages. Default is null.&#x20;
