tabby/ee/tabby-ui/components/markdown.tsx

10 lines
290 B
TypeScript
Raw Permalink Normal View History

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
)