import PureRenderMixin from 'react-addons-pure-render-mixin'; import ImmutablePropTypes from 'react-immutable-proptypes'; const Header = React.createClass({ propTypes: { account: ImmutablePropTypes.map.isRequired }, mixins: [PureRenderMixin], render () { const { account } = this.props; let displayName = account.get('display_name'); if (displayName.length === 0) { displayName = account.get('username'); } return (
{displayName}
@{account.get('acct')}

{account.get('note')}

); } }); export default Header;