function clickMe(e){
//e is the event
}
<button onClick={this.clickMe}></button>
function clickMe(parameter){
//how to get the "e" ?
}
<button onClick={() => this.clickMe(someparameter)}></button>
I want to get the event
. How can I get it?
Try this:
<button onClick={(e) => {
this.clickMe(e, someParameter)
}}>Click Me!</button>
And in your function:
function clickMe(event, someParameter){
//do with event
}