React.js - written timer example