Skip to content

Commit 89424d4

Browse files
committed
chore: add better explanatino
1 parent d0759b7 commit 89424d4

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

package/src/components/Channel/Channel.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -766,7 +766,11 @@ const ChannelWithContext = <
766766

767767
const handleEvent: EventHandler<StreamChatGenerics> = (event) => {
768768
if (shouldSyncChannel) {
769-
// Ignore user.watching.start and user.watching.stop events
769+
/**
770+
* Ignore user.watching.start and user.watching.stop as we should not copy the entire state when
771+
* they occur. Also ignore all poll related events since they're being handled in their own
772+
* reactive state and have no business having an effect on the Channel component.
773+
*/
770774
if (
771775
event.type.startsWith('poll.') ||
772776
event.type === 'user.watching.start' ||

0 commit comments

Comments
 (0)