Nothing here yet.
Nothing here yet.
No blogs yet.
I love cycling a lot. I have three separate bicycles, which I service myself. There are also few other hobbies: Mountain bike cycling Road bike cycling Bicycle service Running Electronics / soldering Cooking Animation watching HTPC racing games
That's how I've done it during React learning from official docs. You can see it live here: https://react-play-neone.herokuapp.com/ class Clock extends React . Component { constructor(props) { super (props); this .state = {date: new Date()}; } componentDidMount() { this .timerID = setInterval( () => this .tick(), 1000 ); } componentWillUnmount() { clearInterval( this .timerID); } tick() { this .setState({ date: new Date() }); } render() { return ( <div> <FormattedDate date={ this .state.date} /> </div> ); } } Here is more info about arrow functions introduced in es6 http://es6-features.org/#ExpressionBodies