I have searched everywhere for two days. For some reason, my FCC console is stating “require is not defined,” and nothing is rendering. What is wrong with my code???
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: PropTypes.number.isRequired
};
// change code above this line
Items.defaultProps = {
quantity: 0
};
class ShoppingCart extends React.Component {
constructor(props) {
super(props);
}
render() {
return <Items quantity={3}/>
}
};
Thank you so much. This has been a pain.