title: -js- React "component did mount" example
body: <p>I'm trying to get started with react. Having examining the code examples I came across with a pretty strange thing. This is the link <a href="https://facebook.github.io/react/docs/state-and-lifecycle.html" rel="nofollow noreferrer">[React tutorial]</a>. This is the code from the lifecycles section;</p>
  
  <pre><code>componentDidMount() {
  this.timerID = setInterval(
    () =&gt; this.tick(),
    1000
  );
  }
  </code></pre>
  
  <p>So, when setting the interval why an arrow function is used ? I tried otherwise(this.tick() itself) but it didn't work as expected.</p>