import React, {Component, PropTypes} from 'react'; import styles from './IgnoredUsers.css'; export class IgnoredUsers extends Component { static propTypes = { users: PropTypes.arrayOf(PropTypes.shape({ username: PropTypes.string, id: PropTypes.string, })).isRequired, // accepts { id } stopIgnoring: PropTypes.func.isRequired, } render() { const {users, stopIgnoring} = this.props; return (
{ users.length ?

Because you ignored these, you do not see their comments.

: null }
{ users.map(({username, id}) => (
{ username }
stopIgnoring({id})} className={styles.link}>Stop ignoring
)) }
); } } export default IgnoredUsers;