import React from 'react'; import {murmur3} from 'murmurhash-js'; import {CSSTransitionGroup} from 'react-transition-group'; import styles from './CommentAnimatedEdit.css'; import PropTypes from 'prop-types'; const CommentBodyHighlighter = ({children, body}) => { return ( {React.cloneElement(React.Children.only(children), {key: murmur3(body)})} ); }; CommentBodyHighlighter.propTypes = { children: PropTypes.node, body: PropTypes.string, }; export default CommentBodyHighlighter;