Skip to main content

Message List

The Channel screen alone lacks a user interface (UI) and requires additional components to function properly, with the most crucial one being the MessageList component. The MessageList can be considered as a specialized FlashList, specifically designed for displaying messages.

Props Required

PropertyTypeDescriptionOptional
chatroomIDstringChatroom Id✔️
handleLongPressstringMethod to handle long press on messages✔️
handleClickanyMethod to handle press on messages once message is selected✔️
removeReactionanyMethod to remove a reaction✔️
onTapToUndoanyMethod to handle on tap to undo functionality for DM✔️
handleFileUploadanyMethod to handle file upload✔️
navigationanyNavigation prop to handle navigation✔️
refanyMessage input reference✔️

Code snippet

<MessageList
chatroomID={chatroomID}
handleLongPress={handleLongPress}
handleClick={handleClick}
removeReaction={removeReaction}
onTapToUndo={onTapToUndo}
handleFileUpload={handleFileUpload}
navigation={navigation}
ref={refInput}
/>