{"size": 906, "ext": "js", "max_stars_repo_path": "client/src/common/components/Counter.js", "max_stars_repo_name": "pitzcarraldo/spring-react-redux-universal-example", "max_stars_repo_stars_event_min_datetime": "2017-04-14T11:53:08.000Z", "max_stars_repo_stars_event_max_datetime": "2019-08-20T10:09:20.000Z", "max_issues_repo_path": "client/src/common/components/Counter.js", "max_issues_repo_name": "pitzcarraldo/spring-react-redux-universal-example", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "client/src/common/components/Counter.js", "max_forks_repo_name": "pitzcarraldo/spring-react-redux-universal-example", "max_forks_repo_forks_event_min_datetime": "2019-02-26T13:20:48.000Z", "max_forks_repo_forks_event_max_datetime": "2019-02-26T13:20:48.000Z"}
{"max_stars_count": 6, "max_issues_count": null, "max_forks_count": 1, "avg_line_length": 25.1666666667, "max_line_length": 100, "alphanum_fraction": 0.6302428256}
import React, { Component, PropTypes } from 'react';

class Counter extends Component {

  constructor(props) {
    super(props);
  }

  render() {
    const { incrementCounter, decrementCounter, counter } = this.props;
    return (
      <div className="posts">
        <h1>Counter</h1>
        <p>This counter is here to show the state is conserved as you navigate through the app.</p> 
        <p>
          <b>Counter: {counter} times</b>
          {' '}
          <button onClick={incrementCounter}>+</button>
          {' '}
          <button onClick={decrementCounter}>-</button>
        </p>
      </div>
      
    );
  }
}

Counter.propTypes = {
  incrementCounter: PropTypes.func.isRequired,
  incrementIfOdd: PropTypes.func.isRequired,
  incrementAsync: PropTypes.func.isRequired,
  decrementCounter: PropTypes.func.isRequired,
  counter: PropTypes.number.isRequired
};

export default Counter;