import { h, Component } from 'preact'; import PropTypes from 'prop-types'; class SidebarUser extends Component { constructor(props) { super(props); this.onClick = this.onClick.bind(this); } onClick() { this.props.followUser(this.props.user); } render() { return (
); } } SidebarUser.propTypes = { followUser: PropTypes.func.isRequired, user: PropTypes.object.isRequired, index: PropTypes.number.isRequired, }; export default SidebarUser;