Рет қаралды 9,306
Hello everyone
In this video, we have covered propTypes and defaultProps, that will allow you to add validation on propTypes so that you can make your code error free and it will also make your debugging easy
DefaultProps allows you to pass some default value to the props if that prop is not passed by Parent component then your component will work on the data passed in defaultProps.
PropTypes package has moved to separate package now from React version 15.5, so if you are using latest version then now we need to install this package using npm
npm install prop-types --save
Support my channel by liking and sharing my videos so that I can reach to wider audience. Please share it in your network 🙏
►Checkout previous video on Props
• Props Tutorial: React...
►Checkout previous video on NPM
• What is NPM, why we us...
►Checkout previous video on Components
• Components Tutorial: ...
►Virtual DOM and Real DOM
• ReactJS Tutorial: What...
►ReactJS Introduction
• ReactJS Tutorial - Int...
►Click here to Subscribe the channel:
studio.kzbin.info/door/...
►JavaScript Course with ES6 Features-:
kzbin.info/aero/PLC...
►Angular Complete Course:
kzbin.info/aero/PLC...
►All important shorts videos:
kzbin.info/aero/PLC...
Connect with Me On Social Media
Facebook: / angularjs4be. .
LinkedIn: / nisha-sin. .
Instagram : / nishasingla05
Twitter: / nishasingla05
#nishasingla #react #propTypes