<commit_before>import React, { Component, PropTypes } from 'react';


export default class List extends Component {
  static propTypes = {
    Item: PropTypes.func.isRequired,
    items: PropTypes.array.isRequired,
    onSelect: PropTypes.func.isRequired
  };

  render() {
    const { Item, items, onSelect } = this.props;

    return <ul>
      {items.map((item, index) =>
        <li key={item.id}>
          <Item {...item} onSelect={() => { onSelect({ index }); }} />
        </li>
      )}
    </ul>;
  }
}<commit_msg>Use the item index as the React key<commit_after>import React, { Component, PropTypes } from 'react';


export default class List extends Component {
  static propTypes = {
    Item: PropTypes.func.isRequired,
    items: PropTypes.array.isRequired,
    onSelect: PropTypes.func.isRequired
  };

  render() {
    const { Item, items, onSelect } = this.props;

    return <ul>
      {items.map((item, index) =>
        <li key={index}>
          <Item {...item} onSelect={() => { onSelect({ index }); }} />
        </li>
      )}
    </ul>;
  }
}
{'fraction_non_alphanumeric': 0.15823970037453183, 'fraction_numerical': 0.0, 'mean_word_length': 2.5752508361204014, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 17, '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': '82863', 'n_tokens_mistral': 332, 'n_tokens_neox': 332, 'n_words': 85}