'use strict';

import React from 'react';

// CSS
import 'normalize.css';
import 'styles/main.css';

const ClocketteApp = React.createClass({
  render() {
    return (
      <p>It's working!</p>
    );
  }
});

export default ClocketteApp;

'use strict';

import React from 'react';
import { RouteHandler } from 'react-router';

import 'normalize.css';
import 'styles/main.css';


const ClocketteApp = React.createClass({

  getInitialState() {
    this.interval = null;

    return {
      ts: Date.now()
    };
  },

  componentDidMount() {
    this.interval = setInterval(() => {
      this.setState({
        ts: Date.now()
      });
    }, 1000 * 30);
  },

  componentWillUnmount() {
    clearInterval(this.interval);
  },

  render() {
    return (
      <RouteHandler ts={this.state.ts}/>
    );
  }

});

export default ClocketteApp;

Add routeHandler in App, application global timestamp state + interval to refresh it naively (so far)
Add routeHandler in App, application global timestamp state + interval to refresh it naively (so far)
