Performance (#602)

This commit is contained in:
Anthony Puppo authored and GitHub committed 2023-04-19 08:39:19 -06:00
1 parent 24068ea5aa
commit c959264f93
4 files changed
+18 -4

No files matched your search

@@ -1,4 +1,9 @@
import { FC, memo } from 'react';
import ReactMarkdown, { Options } from 'react-markdown';
export const MemoizedReactMarkdown: FC<Options> = memo(ReactMarkdown);
export const MemoizedReactMarkdown: FC<Options> = memo(
ReactMarkdown,
(prevProps, nextProps) => (
prevProps.children === nextProps.children
)
);