import React from 'react' import PropTypes from 'prop-types' export default class Message extends React.Component { render() { return (
@{this.props.user.uname}:

{this.props.body}

) } }; Message.propTypes = { mid: PropTypes.number.isRequired, user: PropTypes.shape({ uid: PropTypes.number.isRequired, uname: PropTypes.string.isRequired }), timestamp: PropTypes.string.isRequired, body: PropTypes.string.isRequired }