title: Cannot access state inside callback
body: <p>I've foreach function where I'm iterating the markers and calling getDetails function. At the end of getDetails, I'm calling callback function when all elements are processed. Inside callback I'm trying to access state property but I'm unable to access it. I've tried using bind method however error I'm getting is Uncaught TypeError: Cannot read property 'callback' of null.</p>
  
  <pre><code>export default class extends Component {
    constructor(props) {
    super(props);
    this.state = {
      markers: []
      value: ''
    }
  
   handleChange(event) {
     callback = () =&gt; {
       console.log(this.state.markers);
     }
     markers.forEach((place,index) =&gt; {
       .....
       services.getDetails(request, (place, status) =&gt;  {
          if(place != null){
              .....
          }else{
  
          }
  
          itemsProcessed++;
          if(itemsProcessed === markers.length) {
              this.callback();
          }
      });
     });
   }
  
  }
  </code></pre>