<commit_before>
import React, { Component, PropTypes } from 'react';
const isEqual = require('lodash.isequal');


class ResultsCount extends React.PureComponent {

  constructor(props) {
    super(props);
  }

  static propTypes = {
    items: PropTypes.array,
    graphqlLoading: PropTypes.bool.isRequired
  }

  render() {
    const resultsCount = this.props.items ? this.props.items.length : 0;
    return (
      <span>
        {resultsCount} results
      </span>
    );
  }
}

export default ResultsCount;<commit_msg>Fixing Results Count component shouldupdate.<commit_after>
import React, { Component, PropTypes } from 'react';
const isEqual = require('lodash.isequal');


class ResultsCount extends React.PureComponent {

  constructor(props) {
    super(props);
  }

  static propTypes = {
    items: PropTypes.array,
    graphqlLoading: PropTypes.bool.isRequired
  }

  shouldComponentUpdate(nextProps) {
    return (!nextProps.graphqlLoading && typeof nextProps.items === 'object');
  }

  render() {
    const resultsCount = this.props.items ? this.props.items.length : 0;
    return (
      <span>
        {resultsCount} results
      </span>
    );
  }
}

export default ResultsCount;
{'fraction_non_alphanumeric': 0.11519198664440734, 'fraction_numerical': 0.001669449081803005, 'mean_word_length': 3.3285198555956677, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '5391564', 'n_tokens_mistral': 363, 'n_tokens_neox': 354, 'n_words': 81}