<commit_before>/**
 * Created by carl.hand on 03/04/2017.
 */
import React, { Component, PropTypes } from 'react'

export default class Stopwatch extends React.Component {

    render() {
        return (
            <div className="stopwatch">
                <div className="stopwatch-time">
                    {this.props.time}
                </div>
                <button onClick={this.props.shouldStart}>Start</button>
                <button onClick={this.props.reset}>Reset</button>
            </div>
        );
    }
}

Stopwatch.PropTypes = {
    start: React.PropTypes.func.isRequired,
    reset: React.PropTypes.func.isRequired,
    time: React.PropTypes.number.isRequired
};<commit_msg>refactored Stopwatch to be a pure component<commit_after>/**
 * Created by carl.hand on 03/04/2017.
 */
import React, { Component, PropTypes } from 'react'

const Stopwatch = (props) => {

    return (
        <div className="stopwatch">
            <div className="stopwatch-time">
                {props.time}
            </div>
            <button onClick={props.shouldStart}>Start</button>
            <button onClick={props.reset}>Reset</button>
        </div>
    );
};

Stopwatch.PropTypes = {
    start: React.PropTypes.func.isRequired,
    reset: React.PropTypes.func.isRequired,
    time: React.PropTypes.number.isRequired
};

export default Stopwatch;
{'fraction_non_alphanumeric': 0.12976539589442815, 'fraction_numerical': 0.011730205278592375, 'mean_word_length': 2.305084745762712, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 20, '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': '5079775', 'n_tokens_mistral': 406, 'n_tokens_neox': 387, 'n_words': 81}