RoomList

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

A preview of what the RoomList looks by default

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.

Recommended: useIsFocused from react-navigation (click here for docs)

If not provided, pressing the rows won't do anything.

onRowPress = Room => {...}

renderListItem

Should return an element that will represent the room in the list.

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)

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

Last updated