how pass value to functional component with onClick event in react code example
Example: passing argument to function handler functional compoent javascript react
function MyComponent(props) {
function handleChange(event, data){
console.log(event.target.value);
console.log(data)
}
return <button onClick={(event) => handleChange(event, 'Some Custom Value')} value='Foo'>Click</button>
}