title: Named function causing error with setState
body: <p>This is my App class</p>
  
  <pre><code>  constructor(props) {
      super(props);
  
      this.state = { lat: null, errorMessage: "" };
  
      window.navigator.geolocation.getCurrentPosition((position) =&gt; {
        this.setState({ lat: position.coords.latitude });
      });
    }
  </code></pre>
  
  <p>When i change the arrow function to use the word function it throws me an error saying cannot read property of setState of undefined</p>
  
  <pre><code>  constructor(props) {
      super(props);
  
      this.state = { lat: null, errorMessage: "" };
  
      window.navigator.geolocation.getCurrentPosition(function (position) {
        this.setState({ lat: position.coords.latitude });
      });
    }
  </code></pre>
  
  <p>Is something wrong with the syntax?</p>