Skip to content

Lesson 4 1#31

Open
kiruikkev wants to merge 21 commits intoCode-the-Dream-School:mainfrom
kiruikkev:lesson-4-1
Open

Lesson 4 1#31
kiruikkev wants to merge 21 commits intoCode-the-Dream-School:mainfrom
kiruikkev:lesson-4-1

Conversation

@kiruikkev
Copy link

Last lesson

Copy link

@nathanhmiles nathanhmiles left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Double check your understanding of why we are using propTypes in this lesson

setTodoTitle('');
};
AddTodoForm.propTypes={
onAddTodo:propTypes.string

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The onAddTodo prop is a function, so the value here should be propTypes.func

return (
<ul>

{props.todoList.map(function (item) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here we have props.todooList, where we expect todoList to be an array, so in TodoList.propTypes, we should define props.todoList as propTypes.array.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants