(Choose 1 answer)
What will the following code output to the console when a user clicks the button?
class MyButton extends React.Component {
state = {
a: 5,
b: 10,c: 15
};
render() { return ( <button onClick={this.handleClick}>click me</button>);
}
handleClick = () => {
this.setState({a: 20,
c: 25
});
console.log(this.state);}
} ReactDOM.render(<MyButton/>, document.getElementById("root"));
A. {a: 20, b: 10, с: 25}
B. {a: 20, c: 25}
C. {a: 5, b: 10, с: 15}
33