Add Custom propType Validation to React Components

InstructorJoe Maddalone

Share this video with your friends

Send Tweet

In addition to the types built into React.propTypes we can also define our own custom propType validator

Vipulsharm
~ 7 years ago

Title.propTypes = { text(props, propName, component){ console.log(props, propName, component); } }

-- It's getting consoled twice.. is it always the case ? Any specifics ?