import React, { Component } from 'react';
class App extends Component {
constructor(props) {
super(props);
this.handleClick = this.handleClick.bind(this);
}
handleClick = (event) => {
alert(event.type);
}
render() {
return (
<div>
<div className="text-center">
<button className="btn btn-secondary" onClick={this.handleClick}>
Click Me
</button>
</div>
</div>
);
}
}
export default App;