CoursesPage handleSubmit
parent
c4394dd747
commit
229691cbc7
|
@ -12,9 +12,14 @@ class CoursesPage extends React.Component {
|
||||||
this.setState({ course });
|
this.setState({ course });
|
||||||
};
|
};
|
||||||
|
|
||||||
|
handleSubmit = (event) => {
|
||||||
|
event.preventDefault();
|
||||||
|
alert(this.state.course.title);
|
||||||
|
};
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
return (
|
return (
|
||||||
<form>
|
<form onSubmit={this.handleSubmit}>
|
||||||
<h2>Courses</h2>
|
<h2>Courses</h2>
|
||||||
<h3>Add Course</h3>
|
<h3>Add Course</h3>
|
||||||
<input
|
<input
|
||||||
|
|
Loading…
Reference in New Issue