React has an in built mechanism to add type checking for the components. A special property called PropTypes is used for setting up the type checkin…