Dependent ticket: complete and merge #9 before starting this ticket
Instructions:
In the <Restaurant /> component, create a new function named orderOne. The orderOne function doesn't take any parameters and should use the setOrders function to increment the orders state variable by 1. Then, add a onClick handler to the Add <button> that calls the orderOne function when it's being clicked.
Test:
When the Add button is clicked, the number of pizzas increases by 1
Dependent ticket: complete and merge #9 before starting this ticket
Instructions:
In the
<Restaurant />component, create a new function namedorderOne. TheorderOnefunction doesn't take any parameters and should use thesetOrdersfunction to increment theordersstate variable by 1. Then, add aonClickhandler to the Add<button>that calls theorderOnefunction when it's being clicked.Test:
When the Add button is clicked, the number of pizzas increases by 1