In the code editor, look at the property on
What are the properties on
propTypes supposed to be, exactly?
The name of each property in
propTypes should be the name of an expected
prop. In our case,
MessageDisplayer expects a
message, so our property’s name is
The value of each property in
propTypes should fit this pattern:
message is presumably going to be a string, we chose
PropTypes.string. You can see this on line 13. Notice the difference in capitalization between the
propTypes object and
Each property on the
propTypes object is called a
Select the next file in the code editor, Runner.js. Find
Runner has six
propTypes! Look at each one. Note that
func are abbreviated, but all other data types are spelled normally.
If you add
.isRequired to a
propType, then you will get a console warning if that
prop isn’t sent.
Try to find all six
props from the
propTypes object in
Runner‘s render function:
propTypes object, write one
propType for each
BestSeller is expecting:
author strings. Make
weeksOnList a number. Make all three
If you get stuck, look to Runner.js for guidance.
Good! You just gave
In the code editor, open the last file, BookList.js.
At the bottom of the file, render
<BookList /> using