score:1

Accepted answer

bind the functions in the constructor.

constructor (props) {
  super(props);
  this.add = this.add.bind(this);
  this.somefunc = this.somefunc.bind(this);
}

or use arrow notation (no need for bind)

const add = () => { /* do something */ }
const somefunc = () => { /* do something */ }

<button 
  onclick={this.add}
>
  +1
</button>

update

using both functions in one onclick

const dosomething = (e) => {
  add();
  somefunc();
}

<button 
  onclick={this.dosomething}
>
  +1
</button>

Related Query

More Query from same tag