From b7a79c8fdd9d4fc71491de570dbc73b0dba9186f Mon Sep 17 00:00:00 2001 From: Lim Chee Aun Date: Thu, 15 Feb 2024 18:07:17 +0800 Subject: [PATCH] Better memo for Notification --- src/components/notification.jsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/notification.jsx b/src/components/notification.jsx index 20e53045..264ce4f7 100644 --- a/src/components/notification.jsx +++ b/src/components/notification.jsx @@ -357,4 +357,6 @@ function TruncatedLink(props) { return ; } -export default memo(Notification); +export default memo(Notification, (oldProps, newProps) => { + return oldProps.notification?.id === newProps.notification?.id; +});