button is clicked react js code example
Example 1: react button onclick
<button onClick={sayHello}>Click</button>
Example 2: get syntethicbaseevent and parameter in react
Try this:
<button onClick={(e) => clickMe(e, someParameter)}>Click Me!</button>
And in your function:
function clickMe(event, someParameter){
//do with event
}