React: Use PropTypes to Define the Props You Expect Issue

Hello,

I am having troubling completing the task: React: Use PropTypes to Define the Props You Expect. The error message that is displayed is ‘require is not defined’ any ideas on how to resolve this would be great.

Thank you

Linkt to the challenge
https://learn.freecodecamp.org/front-end-libraries/react/use-proptypes-to-define-the-props-you-expect/

some helpfull guide: https://guide.freecodecamp.org/certifications/front-end-libraries/react/use-proptypes-to-define-the-props-you-expect/

const Items = (props) => {
return

Current Quantity of Items in Cart: {props.quantity}


};

// change code below this line
import React, { propTypes } from ‘react’;

Items.propTypes = {
quantity: PropTypes.number.isRequired
};
// change code above this line

Items.defaultProps = {
quantity: 0
};

class ShoppingCart extends React.Component {
constructor(props) {
super(props);
}
render() {
return
}
};

You don’t need to import React or PropTypes for the challenge.

Cool thanks for your help, I’ve managed to complete the task :slight_smile: