Member List for PubNub Chat Components for React Native

Renders a list of members.

It can represent all users of the application, only members of the current channel, users currently subscribed/present on the channel, or whatever else is passed into it. Custom memberRenderer can be used to modify how the users are rendered. For example you can add presence indicators.


Check the preview of a sample Member List component and its source code.

You are set as Sue Flores.

Member List


You can configure the component using these parameters:

ParameterTypeDefault valueDescription
members?UserEntity[] | string[][]Option to pass a list of members, including metadata, to render on the list.
presentMembers?string[][]Option to pass a list of present member IDs to mark them with a presence indicator.
selfText?string"(You)"This text is added after current user's name.
sort?(a: UserEntity, b: UserEntity) => -1 | 0 | 1n/aMembers are sorted by presence and alphabetically by default, you can override that by providing a sorter function.
extraActionsRenderer?(member: UserEntity) => JSX.Elementn/aProvide extra actions renderer to add custom action buttons to each member.
memberRenderer?(member: UserEntity) => JSX.Elementn/aOption to provide a custom user renderer to override themes and styles.
onMemberClicked?(member: UserEntity) => unknownn/aCallback run when a user clicked one of the members.
onMemberLongPressed?(member: UserEntity) => unknownn/aCallback run when a user long pressed one of the members. Can be used for extra actions menu.
style?MemberListStylen/aOption to provide a custom StyleSheet for the component. It will be merged with the default styles.