MessageList

A simple interface for displaying messages in a room.

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:

{
    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.

Last updated