Skip to content

hw3#3

Open
chanjessica wants to merge 2 commits intofrontend-application-development-uw20:masterfrom
chanjessica:master
Open

hw3#3
chanjessica wants to merge 2 commits intofrontend-application-development-uw20:masterfrom
chanjessica:master

Conversation

@chanjessica
Copy link

Week 3 HW Submission

Please fill out the information below in order to complete your assignment. Feel free to update this comment later if necessary.

  • Comfort rating on this assignment (1-5): 1|2|3|4|5
  • Completion rating on this assignment: complete|incomplete


)
}
<span className="total">Total = ${checkout.reduce((total, rental) => parseFloat(total) + parseFloat(rental.price), 0)}</span>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice reduce fuction!

};
static propTypes = {
rData: PropTypes.arrayOf(
PropTypes.shape({

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great use of shapes here!

return (e) => {
e.preventDefault();
// alert(id + ' ' + rental + ' is removed from your cart');
const newCheckout = this.state.checkout.filter(rental => rental.id !== id);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

<main>
{
this.props.rData.map((x, i) =>
<dl key={i}>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dang, breaking out the <dl> tag, huh?

<div>
<main>
{
this.props.rData.map((x, i) =>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit use a more descriptive variable name than x

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants