<commit_before>import cx from 'classnames';
import React from 'react';
import UserRow from './UserRow';

export default class UserList extends React.Component {
  static propTypes = {
    className: React.PropTypes.string,
    users: React.PropTypes.array
  };

  render() {
    return (
      <div className={cx('UserList', this.props.className)}>
        {this.props.users.map(user => {
          return (
            <UserRow
              key={user._id}
              className="UserList-row"
              {...user}
            />
          );
        })}
      </div>
    );
  }
}<commit_msg>users: only render visible rows in user list<commit_after>import cx from 'classnames';
import React from 'react';
import List from 'react-list';
import UserRow from './UserRow';

export default class UserList extends React.Component {
  static propTypes = {
    className: React.PropTypes.string,
    users: React.PropTypes.array
  };

  renderRow(index, key) {
    const user = this.props.users[index];
    return (
      <UserRow
        key={key}
        className="UserList-row"
        {...user}
      />
    );
  }

  render() {
    return (
      <div className={cx('UserList', this.props.className)}>
        <List
          itemRenderer={::this.renderRow}
          length={this.props.users.length}
          type="uniform"
        />
      </div>
    );
  }
}
{'fraction_non_alphanumeric': 0.13313825896122897, 'fraction_numerical': 0.0, 'mean_word_length': 2.109090909090909, 'pattern_counts': {'":': 0, '<': 10, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '950684', 'n_tokens_mistral': 403, 'n_tokens_neox': 397, 'n_words': 91}