Feature Restaurant State
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 55/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Ferma
- Stack tecnologico
- javascript, react
- Ambito
- frontend
Direzione di ricerca
Inizia dal componente Restaurant e controlla come vengono utilizzati il valore pizzas attuale e il pulsante Add. Importa useState di React, crea orders con un valore iniziale pari a 0 e rimuovi la variabile pizzas. Verifica che il numero di pizze ordinate continui a essere visualizzato come 0 sullo schermo.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Instructions:
Working in Restaurant component
At 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 orders along with the function to set the orders state setOrders. The initial value of the orders state should be 0. Use the new orders variable instead of the pizzas variable (that you can now delete).
Hint: You need to use the React function useState to create a state variable. Remember to import the function at the top with import React, {useState} from "react";.
Test:
- The number of ordered pizzas is still 0 on the screen.
- Lingua principale
- JavaScript
- Stelle
- 1
- Fork
- 28
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di CodeYourFuture/React-Module-Project
-
Feature Error Message Aperta♟️ Dependent ticket 🏕 Priority Mandatory 🐇 Size Small 📅 Week 3 📅 Week 4
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
-
Feature Loading Message Aperta🏕 Priority Mandatory 🐂 Size Medium 📅 Week 4 🧩 Feature
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
-
Feature Search State Aperta🐂 Size Medium 📅 Week 3 🧩 Feature
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
-
Feature Active Row Aperta🏝️ Priority Stretch 🐂 Size Medium 📅 Week 2 🧩 Feature
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
-
Feature Bookings state Aperta🏕 Priority Mandatory 🐇 Size Small 📅 Week 2 🧩 Feature
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 68/100
Tutte le issue di CodeYourFuture/React-Module-Project
Issue simili
-
documentation
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
githubnext/gh-aw-workshop#3692 ·
-
agent/guide documentation hive/hosted-available-lke648397-260827-5n31
Difficoltà 2/5 1-3 ore Idoneità per principianti 90/100
-
Add: BuyPass TV Apertachannels:add check:passed
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
-
S: triage
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 85/100
-
bug
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 90/100
apache/cloudstack#14222 ·