DEV Community

Imran Hasan
Imran Hasan

Posted on

PropTypes in React

Props and prop type are important mechanisms in react.props which means “properties” props usually send data from one component to another component in react.If components send wrong data it will show errors and bugs.We pass different type of props like string,number,array,function,objects.When props are passed to a React component, they are checked against the type definitions configured in the propTypes property. When an invalid value is passed for a prop, a warning is displayed on the JavaScript console.``

Top comments (0)