import { Component } from 'react'; import { IMessage } from '../reducer'; export interface IProps { /** * The messages array to render. */ messages: IMessage[]; } /** * Abstract component to display a list of chat messages, grouped by sender. * * @augments PureComponent */ export default class AbstractMessageContainer
extends Component
{
static defaultProps = {
messages: [] as IMessage[]
};
/**
* Iterates over all the messages and creates nested arrays which hold
* consecutive messages sent by the same participant.
*
* @private
* @returns {Array