UNPKG

@plteam/chat-ui

Version:

CUI Kit is a free and open-source library for creating AI assistant chat interfaces, built with React, Material UI, and TypeScript

6 lines (5 loc) 371 B
import * as React from 'react'; const childrenToString = (children) => React.Children.toArray(children).filter(v => typeof v === "string").join('-'); export const markdownComponentsMemoCallback = (prevProps, nextProps) => { return prevProps.inProgress === nextProps.inProgress && childrenToString(prevProps.children) === childrenToString(nextProps.children); };