chatbot-template/components/markdown.tsx

10 lines
293 B
TypeScript
Raw Normal View History

2023-05-19 12:33:56 -04:00
import { FC, memo } from "react";
import ReactMarkdown, { Options } from "react-markdown";
export const MemoizedReactMarkdown: FC<Options> = memo(
ReactMarkdown,
(prevProps, nextProps) =>
prevProps.children === nextProps.children &&
prevProps.className === nextProps.className
);