(Choose 1 answer)
What will the following code output to the console when a user clicks the button?
class MyComponent extends React.Component {
handleClick(e) { console.log(e.target);
}
render() { return (
<button onClick={(params) => this.handleClick(params)}>btn</button>);
}
} ReactDOM.render(<MyComponent />, document.body);
A. undefined
B. MouseEvent
C. <button>btn</button>
D. throw an error
Q: 46