title: Difference between class object Method declaration React?
body: <p>I have seen two ways of declaring methods inside a Class component in <code>React</code></p>
  
  <p><strong>Method 1</strong></p>
  
  <pre><code>class someComp extends React.Component  {  
      handleResetShapes = (e) =&gt; {
          e.preventDefault();
          this.setState({state: 'try'});
      }
  
      render() {}
  }
  </code></pre>
  
  <p><strong>Method 2</strong></p>
  
  <pre><code>class someComp extends React.Component  {  
      handleResetShapes(e) {
          e.preventDefault();
          this.setState({state: 'try'});
      }
  
      render() {}
  }
  </code></pre>
  
  <p>In that specific example <code>Method 1</code> worked and the other didn't. However I have seen methods declared as <code>Method 2</code> and it works fine, just can't provide an example now.</p>
  
  <p><strong>Question</strong></p>
  
  <p>What is the difference and what is that Javascript concept called?</p>