function Form() {
function handleSubmit(e) {
e.preventDefault();
console.log('You clicked submit.');
}
return (
<form onSubmit={handleSubmit}>
<button type="submit">Submit</button>
</form>
);
}
handleClick = event => event.target.classList.add('click-state');
render() {
return <div className="base-state" onClick={this.handleClick}>Click here</div>;
}