Performance (#602)
This commit is contained in:
@@ -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
|
||||
)
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user