> For the complete documentation index, see [llms.txt](https://aelequin.gitbook.io/rnm/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://aelequin.gitbook.io/rnm/ui/roomlist.md).

# RoomList

A simple interface for displaying an inbox of the rooms you've joined.

![A preview of what the RoomList looks by default ](https://616286862-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MTF7IdPkeAGpsLzharB%2F-MTnSylN8Ibm4S0VKJla%2F-MTnZob2g2TP9_nplnpE%2Fimage.png?alt=media\&token=077fb1a6-f42a-4fa8-ad40-78307f657ebe)

## Props

### isFocused (required)

This is required so that the RoomList knows when to start and stop the listeners. RoomList will update the list on it's own.&#x20;

Recommended: `useIsFocused` from react-navigation ([click here for docs](https://reactnavigation.org/docs/use-is-focused/))

### onRowPress (highly recommended)

If not provided, pressing the rows won't do anything.&#x20;

`onRowPress = Room => {...}`

### renderListItem

Should return an element that will represent the room in the list.&#x20;

If provided, overrides `onRowPress`

`renderListItem = Room => {...}`

### renderInvite

Invites appear at the top of the room list. (See above, the row with the green / red buttons to accept or reject the invite)&#x20;

This should be very similar to `renderListItem` because the room has all the same data, but you should choose to join the room or reject the invite. Reject the invite by calling "leaveRoom"

`renderInvite = Room => {...}`

###
