button action in react js code example
Example 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>
Example 2: react event listener
onClick onContextMenu onDoubleClick onDrag onDragEnd onDragEnter onDragExit
onDragLeave onDragOver onDragStart onDrop onMouseDown onMouseEnter onMouseLeave
onMouseMove onMouseOut onMouseOver onMouseUp