I keep getting an error require is not defined, I cannot find a solution, can anyone who had a similar problem help please? And it says in the excersize text to import in the way I did below
´import React, { PropTypes } from ‘react’;´
Your code so far
import React, { PropTypes } from 'react';
const Items = (props) => {
return <h1>Current Quantity of Items in Cart: {props.quantity}</h1>
};
// change code below this line
Items.propTypes = {
quantity: React.PropTypes.number.isRequired
}
// change code above this line
Items.defaultProps = {
quantity: 0
};
class ShoppingCart extends React.Component {
constructor(props) {
super(props);
}
render() {
return <Items />
}
};
Your browser information:
User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36.