Answers for "react why onclick property function trigger without click"

1

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>
Posted by: Guest on June-14-2020

Code answers related to "react why onclick property function trigger without click"

Code answers related to "Javascript"

Browse Popular Code Answers by Language