title: how to solve the ` Component should be written as a pure function ` error in eslint-react?
body: <pre><code>class Option extends React.Component {
    constructor(props) {
      super(props);
      this.handleClickOption = this.handleClickOption.bind(this);
    }
    handleClickOption() {
      // some code
    }
    render() {
      return (
        &lt;li onClick={this.handleClickOption}&gt;{this.props.option}&lt;/li&gt;
      );
    }
  }
  </code></pre>
  
  <p>I use <a href="https://github.com/airbnb/javascript/tree/master/packages/eslint-config-airbnb" rel="noreferrer">eslint-config-airbnb</a> to check the above code and it show me an error msg like <code>Component should be written as a pure function</code> .</p>
  
  <p>So how to change the above component to pure function?</p>
  
  <p>Thanks for your help.</p>