title: "this" is not defined in event handlers
body: <blockquote>
    <p>why this is not defined in function increaseCounter but is defined in getBadgeClass function ?</p>
  </blockquote>
  
  <pre><code>&lt;button onClick = { this.increaseCounter } className = { 
  this.getBadgeClasses() }&gt;increment&lt;/button&gt;
  
  getBadgeClasses() {         
      let classes = "badge m-2 badge-";
      classes += this.state.count === 0 ? "warning" : "primary";
      return classes;
  }
  
   increaseCounter(){
      this.state.count++;
  }
  </code></pre>