Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 28
Feature Restaurant State #9
Copy link
Copy link
Open
Labels
🏕 Priority MandatoryThis work is expectedThis work is expected📅 Week 2Assigned during Week 2 of this moduleAssigned during Week 2 of this module🦔 Size TinyLess than 30 minutesLess than 30 minutes
Description
Metadata
Metadata
Assignees
Labels
🏕 Priority MandatoryThis work is expectedThis work is expected📅 Week 2Assigned during Week 2 of this moduleAssigned during Week 2 of this module🦔 Size TinyLess than 30 minutesLess than 30 minutes
Type
Projects
StatusShow more project fields
📋 Backlog
Instructions:
Working in
RestaurantcomponentAt the moment, the number of pizzas a guest can order is static and set to 0, even if they click on the 'Add' button. We will change that in the following to let a guest add more pizzas to their order. First, declare a new state variable
ordersalong with the function to set the orders statesetOrders. The initial value of theordersstate should be 0. Use the newordersvariable instead of thepizzasvariable (that you can now delete).Hint: You need to use the React function
useStateto create a state variable. Remember to import the function at the top withimport React, {useState} from "react";.Test: