What will be the output of the following code?
class App extends React.Component {
handleClick = (event, message) => {
console.log(message);
};
render() {
return (
<button onClick={(e) => this.handleClick(e, "Hello World")}>
Click Me
</button>
);
}
}
undefined
Hello World
e
null
This question is part of this quiz :
Event Handling in React