Skip to content

Commit 55cd991

Browse files
committed
fix join issue
1 parent eb9425d commit 55cd991

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

src/components/Message/Message.tsx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1057,6 +1057,13 @@ const MessageWithContext = <
10571057
targetedStyle,
10581058
]}
10591059
/>
1060+
{/**
1061+
* MessagesProvider is here to prevent and issue where FlatList
1062+
* and context re-rendering causes memoization to be skipped.
1063+
* We will separate messages to another context and keep the
1064+
* components currently in the same context apart to remove
1065+
* the need for this in a future PR.
1066+
*/}
10601067
<MessagesProvider value={messagesContext}>
10611068
<MessageProvider value={messageContext}>
10621069
<MessageSimple />

src/components/Message/hooks/useCreateMessageContext.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ export const useCreateMessageContext = <
6666
}${message.updated_at}${message.deleted_at}${readBy}${message.status}${
6767
message.type
6868
}${message.text}${message.reply_count}`;
69-
const membersValue = Object.keys(members).join;
69+
const membersValue = JSON.stringify(members);
7070

7171
const messageContext: MessageContextValue<
7272
At,

0 commit comments

Comments
 (0)