CodeYourFuture / CodeYourFuture/React-Module-Project

Feature Restaurant State

オープン
#9 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
🏕 Priority Mandatory 📅 Week 2 🦔 Size Tiny
主要言語
JavaScript
スター
1
フォーク
28
PR マージ指標
30日以内にマージされた PR はありません

説明

**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.

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。