CoursesPage - display courses

master
Tudor Stanciu 2020-04-11 19:27:53 +03:00
parent 2061371670
commit 0fa1f83aa9
1 changed files with 5 additions and 1 deletions

View File

@ -31,13 +31,17 @@ class CoursesPage extends React.Component {
value={this.state.course.title}
/>
<input type="submit" value="Save" />
{this.props.courses.map((course) => (
<div key={course.title}>{course.title}</div>
))}
</form>
);
}
}
CoursesPage.propTypes = {
dispatch: PropTypes.func.isRequired
dispatch: PropTypes.func.isRequired,
courses: PropTypes.array.isRequired
};
function mapStateToProps(state) {