Skip to content

Roland's DeliverEat: Lovely Grubbly#6

Open
rolandjlevy wants to merge 35 commits intoconstructorlabs:masterfrom
rolandjlevy:master
Open

Roland's DeliverEat: Lovely Grubbly#6
rolandjlevy wants to merge 35 commits intoconstructorlabs:masterfrom
rolandjlevy:master

Conversation

@rolandjlevy
Copy link
Copy Markdown

@rolandjlevy rolandjlevy commented Oct 23, 2018

Will create Readme file shortly...

By the way, I struggled with the incQuantity function in MenuItem.js.

Originally I was incrementing the quantity of each item using state but when I wanted to reset the value to zero I got stuck because I couldn't use setState inside render. My workaround involves accessing the input element from the button element. The code looks kind of ridiculous:

const inputValue = Number(event.currentTarget.parentNode.parentNode.parentNode.parentNode.quantity.value)

Is there a better way of updating the input value from the button element?

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.

1 participant