title: Translating React + Axios from Javascript > Typescript
body: <p>I'm trying to translate this highly useful codepen from Chris Coyier from JS to TS and running into some issues.</p>
  
  <p><a href="https://codepen.io/chriscoyier/pen/jqyWXo" rel="nofollow noreferrer">https://codepen.io/chriscoyier/pen/jqyWXo</a></p>
  
  <p>Early days with Typescript and not sure what Class extend declaration to use.</p>
  
  <p>I'm getting a Property or signature expected.ts(1131) on "const th = this" below. </p>
  
  <p>Not sure whether it's the way I've defined the Class extend for React declaration because typically in TS declaring this const would work without the extend React call. </p>
  
  <pre><code>interface Props {
  }
  
  interface State { 
  }
  
  class App extends React.Component&lt;Props, State&gt;{
      function1 : () =&gt; { }
      function2 : () =&gt; { 
        const th = this;
        this.serverRequest = 
            axios.get(this.props.source).then(function(result) {    
                th.setState({ jobs: result.data.jobs});
                })    
      }
  }
  </code></pre>