import PropTypes from 'prop-types'; function MyComponent({ gender }) { return (By calling `PropTypes.oneOf(["male", "female"])`, we are restricting the `gender` prop to only allow "male" or "female," failing which PropTypes validator would log a warning. The warning message would go to the console if there's an invalid `gender` proptype. The `PropTypes` package is part of the React library itself, and no additional installation is required to use it. It is often used in conjunction with a linter like ESLint to ensure props are given correctly.Gender: { gender }); } MyComponent.propTypes = { gender: PropTypes.oneOf(["male", "female"]).isRequired, };