title: I can not call this.function: TypeError: this.fetchData is not a function
body: <p>I get this error "TypeError: this.fetchData is not a function" when I call <code>this.fetchData();</code> and I thought that <code>this</code> is lost so I tried to use <code>bind</code> or arrow function but it did not work either, how to solve this ?</p>
  
  <pre><code>class ShowResults extends Component {
      getData() {
          return setTimeout(function() {
              this.fetchData();
            }, 2000); //tried to use bind but did not work--&gt; .bind(this);
          }
        }
  
        async fetchData() {
          //code
        }
  }
  </code></pre>