Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Roland's DeliverEat: Lovely Grubbly #6

Open
wants to merge 35 commits into
base: master
Choose a base branch
from

Conversation

rolandjlevy
Copy link

@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