Feature Add more pizzas

Open
#10 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
55/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Stale
Tech stack
javascript
Domain
frontend

Research direction

Complete and merge dependent issue #9 first, then locate the Restaurant component and read how orders and setOrders are defined. Check the Add button entry point and manually verify that clicking it increases the displayed pizza count by one.

Written by the indexing model from the issue text.

Description

♟️ Dependent ticket 🏕 Priority Mandatory 🐇 Size Small 📅 Week 2 🧩 Feature

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

Dominant language
JavaScript
Stars
1
Forks
28
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from CodeYourFuture/React-Module-Project

All issues in CodeYourFuture/React-Module-Project

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.