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