{"size": 810, "ext": "js", "max_stars_repo_path": "app/_core/components/timer/timer.js", "max_stars_repo_name": "christopher-weir/Express-Boilerplate", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "app/_core/components/timer/timer.js", "max_issues_repo_name": "christopher-weir/Express-Boilerplate", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "app/_core/components/timer/timer.js", "max_forks_repo_name": "christopher-weir/Express-Boilerplate", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 23.1428571429, "max_line_length": 61, "alphanum_fraction": 0.5172839506}
'use strict';

var React = require('react');
var template = require('./timer-template.js');
var Timer;


module.exports = Timer = React.createClass(
    {
        getInitialState: function() {
            return {secondsElapsed: 0};
        },
        tick: function() {
            this.setState({
                secondsElapsed: this.state.secondsElapsed + 1
            });
        },
        componentDidMount: function() {
            this.interval = setInterval(this.tick, 1000);
        },
        componentWillUnmount: function() {
            clearInterval(this.interval);
        },

        handleClick: function() {
            console.log('click');
        },

        render: function render() {
            this.render = template.bind(this);
            return this.render();
        }
    }
);
