score:0

class Foo extends React.Component {

  state = {} // if you need it..

  onClick = () => {
    this.props.handleClick(some_constant)
  }

  render() {
    return (
      <div onClick={this.onClick}>
        Hello!
      </div>
    );
  }
}

score:1

class Foo extends React.Component {
  render() {
    const someConstant = ...;
    return (
      <FooDiv
        onClick={this.props.handleClick}
        someConstant={someConstant}
      />
    );
  }
}

score:4

this._handleClickWrapper = this._handleClickWrapper.bind(this);

Related Query

More Query from same tag