Skip to content

Commit 99816a4

Browse files
authored
fix: memoization issue for ReactionList count (#2571)
1 parent ab5ca71 commit 99816a4

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

package/src/components/Message/MessageSimple/ReactionList.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,9 @@ const areEqual = <StreamChatGenerics extends DefaultStreamChatGenerics = Default
312312
Array.isArray(prevReactions) && Array.isArray(nextReactions)
313313
? prevReactions.length === nextReactions.length &&
314314
prevReactions.every(
315-
({ type }, index) => type === nextMessage.latest_reactions?.[index].type,
315+
({ count, type }, index) =>
316+
type === nextMessage.latest_reactions?.[index].type &&
317+
count === nextMessage.latest_reactions?.[index].count,
316318
)
317319
: prevReactions === nextReactions;
318320

0 commit comments

Comments
 (0)