`setInterval` -> `window.setInterval` and remove ugly `window` check by using componentDidMount.