Performance (#602)

This commit is contained in:
Anthony Puppo
2023-04-19 10:39:19 -04:00
committed by GitHub
parent 24068ea5aa
commit c959264f93
4 changed files with 18 additions and 4 deletions
+9
View File
@@ -0,0 +1,9 @@
import { FC, memo } from "react";
import { ChatMessage, Props } from "./ChatMessage";
export const MemoizedChatMessage: FC<Props> = memo(
ChatMessage,
(prevProps, nextProps) => (
prevProps.message.content === nextProps.message.content
)
);