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
@@ -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
)
);