Building a React.js App: Component Validation with PropTypes

Share this video with your friends

Send Tweet

In this video, we’ll add PropTypes to some of our existing components to ensure that each component gets the data it needs to function properly.

egghead eggo
egghead eggo
~ 9 years ago

The lesson video has been updated!

cyberamigo
cyberamigo
~ 8 years ago

If anyone else is having the error: "Uncaught TypeError: Cannot set property 'ReactFireMixin' of undefined" make sure to double check the webpack.config.js that was my problem lol

Shawy
Shawy
~ 8 years ago

For those who learning in ES6 syntax, I believe the propTypes setting would be, for example in UserProfile component, type these lines right after class UserProfile component : UserProfile.propTypes = { username: React.PropTypes.string.isRequired, bio: React.PropTypes.object.isRequired }; It works for me :)