September 2018
Intermediate to advanced
302 pages
7h 17m
English
If you followed along, you may feel a little lost, as your linter probably started complaining about insufficient or missing PropTypes. Let's fix that.
For AppView, we are missing PropTypes validation for the tasks store. When the class is annotated with @observer, it is a little tricky—you need to write PropTypes for wrappedComponent, as shown here:
AppView.wrappedComponent.propTypes = { store: PropTypes.shape({ tasks: PropTypes.arrayOf(PropTypes.shape({ name: PropTypes.string.isRequired, description: PropTypes.string.isRequired, likes: PropTypes.number.isRequired })).isRequired }).isRequired};
For AddTaskForm, we are missing the PropTypes validation for the addTask store action. Let's fix this now:
AddTaskForm.wrappedComponent. ...
Read now
Unlock full access