Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialBrunhilde Vink
9,102 PointsBummer! 'PropTypes' is incorrect
const Book = (props) => {
return ( ... );
}
Book.PropTypes = {
...
};
1 Answer
Steven Parker
231,269 PointsThat's not the correct answer. Remember that identifiers in JavaScript are case-sensitive, so "PropTypes" is not the same thing as "propTypes".
Brunhilde Vink
9,102 PointsBrunhilde Vink
9,102 PointsBut we learned in the React course to use PropTypes instead of propTypes? I'm a bit confused because I indeed tried using propTypes in my latest projects but that gives me errors..
Steven Parker
231,269 PointsSteven Parker
231,269 PointsBoth identifiers are used, but for different things. You can see an example about 3 minutes into the Validate Props with PropTypes video on code lines 14 and 15.