Skip to content

Commit 9af9290

Browse files
committed
fix: useeffect deps
1 parent c5bad92 commit 9af9290

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

package/src/components/Channel/Channel.tsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -792,8 +792,7 @@ const ChannelWithContext = <
792792
});
793793

794794
return unsubscribe;
795-
// eslint-disable-next-line react-hooks/exhaustive-deps
796-
}, [channelId]);
795+
}, [channel?.cid, client]);
797796

798797
/**
799798
* Subscription to the Notification mark_read event.
@@ -805,8 +804,7 @@ const ChannelWithContext = <
805804

806805
const { unsubscribe } = client.on('notification.mark_read', handleEvent);
807806
return unsubscribe;
808-
// eslint-disable-next-line react-hooks/exhaustive-deps
809-
}, []);
807+
}, [channel.cid, client, copyChannelState]);
810808

811809
const threadPropsExists = !!threadProps;
812810

0 commit comments

Comments
 (0)