CoursesPage handleSubmit

master
Tudor Stanciu 2020-04-11 03:14:24 +03:00
parent c4394dd747
commit 229691cbc7
1 changed files with 6 additions and 1 deletions

View File

@ -12,9 +12,14 @@ class CoursesPage extends React.Component {
this.setState({ course });
};
handleSubmit = (event) => {
event.preventDefault();
alert(this.state.course.title);
};
render() {
return (
<form>
<form onSubmit={this.handleSubmit}>
<h2>Courses</h2>
<h3>Add Course</h3>
<input