how to call function on button onclick in react in class based componenets code example
Example: react why onclick property function trigger without click
change:
<button type="button" onClick={this.myFunction(argument)}> myButton </button>
to this:
<button type="button" onClick={this.myFunction.bind(this, argument)}> myButton </button>