title: React performance: anonymous function vs named function vs method
body: <p>I would like to know if, in React.js, there is a performance difference between declaring an anonymous function, a named function, or a method within a component.</p>
  
  <p>Concretely, is one of the following more performant than the others?</p>
  
  <pre><code>class MyComponent extends React.Component {
    render() {
      return (
        &lt;input
          type="text"
          value={foo}
          onChange={(e) =&gt; {
            this.setState({ foo: e.target.value });
          }}
        /&gt;
      );
    }
  }
  </code></pre>
  
  <hr>
  
  <pre><code>class MyComponent extends React.Component {
    ...
    render() {
      function handleChange(e) {
        this.setState({ foo: e.target.value });
      }
      return (
        &lt;input
          type="text"
          value={foo}
          onChange={handleChange}
        /&gt;
      );
    }
  }
  </code></pre>
  
  <hr>
  
  <pre><code>class MyComponent extends React.Component {
      ...
      handleChange(e) {
        this.setState({ foo: e.target.value });
      }
  
      render() {
        return (
          &lt;input
            type="text"
            value={foo}
            onChange={this.handleChange}
          /&gt;
        );
      }
  
  }
  </code></pre>