title: Convert ng-click code to react component
body: <p>I have this following button with <code>ng-click</code></p>
  
  <pre><code>&lt;button ng-click="productClass.saveProductMehod()"&gt;Save&lt;/button&gt;
  </code></pre>
  
  <p>and i try to convert it to React</p>
  
  <pre><code>&lt;button-component on-submit="productClass.saveProductMehod"
     value="'Save'"&gt;&lt;/button-component&gt; 
  </code></pre>
  
  <p>with </p>
  
  <pre><code>class ButtonComponent extends Component {
    constructor(props) {
      super(props);
      this.handleClick = this.handleClick.bind(this);
    }
  
    handleClick() {
      this.props.onSubmit();
    }
  
    render() {
      return (
          &lt;button onClick={this.handleClick}&gt;
              {this.props.value}
          &lt;/button&gt;
      );
    }
  }
  
  ButtonComponent.propTypes = {
    value: PropTypes.string.isRequired,
    onSubmit: PropTypes.func.isRequired,
  };
  
  export { ButtonComponent }
  </code></pre>
  
  <p>ProductClass</p>
  
  <pre><code>class ProductClass {
     saveProductMehod() {
        this.submitted = true;
        //save the product
     }
  }
  </code></pre>
  
  <p>The problem here is when the i click the button i loose <code>this</code> initialization from constructor of the <code>ProductClass</code> and when it gets in the <code>saveProductMethod</code> the this is the props object. What am i missing?</p>