How can I pass arguments to a function in functional component? As far as I know, creating function in jsx is not good practice right?
function MyComponent(props) {
function handleChange(event, data){
console.log(event.target.value);
console.log(data);
}
return <button onClick={handleClick(??)} value='Foo'>Click</button>
}