import React from 'react'; import PropTypes from 'prop-types'; import Comment from './Comment'; import LoadMore from './LoadMore'; class CommentHistory extends React.Component { state = { loadingState: '', }; loadMore = () => { this.setState({ loadingState: 'loading' }); this.props .loadMore() .then(() => { this.setState({ loadingState: 'success' }); }) .catch(() => { this.setState({ loadingState: 'error' }); }); }; render() { const { link, comments, data, root } = this.props; return (