title: 'this' inside a function of a class component (react)
body: <p>I am converting class components into functional components and get the error during removing 'this'.</p>
  <p>The original project (with class components) runs well. But when I remove 'this' from 'this.intervalID', it shows an error</p>
  <p>It confuses me, because 'intervalID' is declared nowhere in the project (neither state, props), only appears in the code below (in the functions startInterval() and stopInterval).</p>
  <p>Maybe I have not yet understood fully how 'this' is used in a class component. Can anyone help? And maybe also help me: how to convert these kind of 'this' in conversion to a functional component.</p>
  <pre><code> startInterval = () =&gt; {
      this.intervalID = setInterval(this.updateData, 15000);
  };
  
  stopInterval = () =&gt; {
      clearInterval(this.intervalID);
  };
  </code></pre>
  <p>Thank you very much!</p>