chatbot-template/components/markdown.tsx

10 lines
290 B
TypeScript
Raw Normal View History

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