CoursesPage handleSubmit
parent
c4394dd747
commit
229691cbc7
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue