{"id":19418896,"url":"https://github.com/reddy-epk/fruits-counter","last_synced_at":"2026-06-10T01:31:33.388Z","repository":{"id":229824429,"uuid":"777731006","full_name":"reddy-epk/fruits-counter","owner":"reddy-epk","description":"A react app for showing on how react-class-components-work .","archived":false,"fork":false,"pushed_at":"2024-03-26T12:11:33.000Z","size":180,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-07T17:42:33.476Z","etag":null,"topics":["front-end-web-development","fruits-counter","react-components","reactjs"],"latest_commit_sha":null,"homepage":"https://epkfruits.ccbp.tech/","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/reddy-epk.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2024-03-26T12:05:53.000Z","updated_at":"2024-03-26T12:21:58.000Z","dependencies_parsed_at":"2024-03-26T13:31:02.953Z","dependency_job_id":"dad55853-53c1-40a0-bd6c-f9f0b6bc89b9","html_url":"https://github.com/reddy-epk/fruits-counter","commit_stats":null,"previous_names":["reddy-epk/fruits-counter"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reddy-epk%2Ffruits-counter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reddy-epk%2Ffruits-counter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reddy-epk%2Ffruits-counter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reddy-epk%2Ffruits-counter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/reddy-epk","download_url":"https://codeload.github.com/reddy-epk/fruits-counter/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240599180,"owners_count":19826959,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["front-end-web-development","fruits-counter","react-components","reactjs"],"created_at":"2024-11-10T13:15:35.658Z","updated_at":"2026-06-10T01:31:33.381Z","avatar_url":"https://github.com/reddy-epk.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"In this project, let's build a **Fruits Counter** by applying the concepts we have learned till now.\n\n### Refer to the image below:\n\n\u003cbr/\u003e\n\u003cdiv style=\"text-align: center;\"\u003e\n    \u003cimg src=\"https://assets.ccbp.in/frontend/content/react-js/fruits-counter-output.gif\" alt=\"fruits-counter\" style=\"max-width:70%;box-shadow:0 2.8px 2.2px rgba(0, 0, 0, 0.12)\"\u003e\n\u003c/div\u003e\n\u003cbr/\u003e\n\n### Design Files\n\n\u003cdetails\u003e\n\u003csummary\u003eClick to view\u003c/summary\u003e\n\n- [Extra Small (Size \u003c 576px) and Small (Size \u003e= 576px)](https://assets.ccbp.in/frontend/content/react-js/fruits-counter-sm-output.png)\n- [Medium (Size \u003e= 768px), Large (Size \u003e= 992px) and Extra Large (Size \u003e= 1200px)](https://assets.ccbp.in/frontend/content/react-js/fruits-counter-lg-output.png)\n\n\u003c/details\u003e\n\n### Set Up Instructions\n\n\u003cdetails\u003e\n\u003csummary\u003eClick to view\u003c/summary\u003e\n\n- Download dependencies by running `npm install`\n- Start up the app using `npm start`\n\u003c/details\u003e\n\n### Completion Instructions\n\n\u003cdetails\u003e\n\u003csummary\u003eFunctionality to be added\u003c/summary\u003e\n\u003cbr/\u003e\n\nThe app must have the following functionalities\n\n- Initially, the count of the eaten mangoes and bananas should be 0\n- When **Eat Mango** is clicked the count of the mangoes eaten should be incremented by 1\n- When **Eat Banana** is clicked the count of the bananas eaten should be incremented by 1\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eImplementation Files\u003c/summary\u003e\n\u003cbr/\u003e\n\nUse these files to complete the implementation:\n\n- `src/components/FruitsCounter/index.js`\n- `src/components/FruitsCounter/index.css`\n\u003c/details\u003e\n\n### Quick Tips\n\n\u003cdetails\u003e\n\u003csummary\u003eClick to view\u003c/summary\u003e\n\u003cbr\u003e\n\n- **State updates are merged**. It means that when you update only one key-value pair in the `state` object, it will not affect the other key-value pairs in the state object.\n\n  For example let's say your state is as followed:\n\n  ```\n  state = { key1 : value1, key2 : value2 }\n  ```\n\n  If you use this.setState such as :\n\n  ```\n  this.setState(prevState =\u003e ({key1: prevState + valueN}))\n  ```\n\n  Your new state will be :\n\n  ```\n  state = { key1 : value3, key2 : value2 }\n  ```\n\n- You can use the below cursor CSS property for buttons to set the type of mouse cursor, to show when the mouse pointer is over an element,\n\n  ```\n    cursor: pointer;\n  ```\n\n  \u003cbr/\u003e\n   \u003cimg src=\"https://assets.ccbp.in/frontend/content/react-js/cursor-pointer-img.png\" alt=\"cursor pointer\" style=\"width:100px\" /\u003e\n\n- You can use the below outline CSS property for buttons and input elements to remove the highlighting when the elements are clicked,\n\n  ```\n    outline: none\n  ```\n\n\u003c/details\u003e\n\n### Resources\n\n\u003cdetails\u003e\n\u003csummary\u003eImage URLs\u003c/summary\u003e\n\n- [https://assets.ccbp.in/frontend/react-js/mango-img.png](https://assets.ccbp.in/frontend/react-js/mango-img.png) alt should be **mango**\n- [https://assets.ccbp.in/frontend/react-js/banana-img.png](https://assets.ccbp.in/frontend/react-js/banana-img.png) alt should be **banana**\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eColors\u003c/summary\u003e\n\n\u003cbr/\u003e\n\n\u003cdiv style=\"background-color: #ffd569 ; width: 150px; padding: 10px; color: black\"\u003eHex: #ffd569\u003c/div\u003e\n\u003cdiv style=\"background-color: #ffffff ; width: 150px; padding: 10px; color: black\"\u003eHex: #ffffff\u003c/div\u003e\n\u003cdiv style=\"background-color: #000000 ; width: 150px; padding: 10px; color: white\"\u003eHex: #000000\u003c/div\u003e\n\u003cdiv style=\"background-color: #007bff ; width: 150px; padding: 10px; color: white\"\u003eHex: #007bff\u003c/div\u003e\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eFont-families\u003c/summary\u003e\n\n- Roboto\n\n\u003c/details\u003e\n\n\u003e ### _Things to Keep in Mind_\n\u003e\n\u003e - All components you implement should go in the `src/components` directory.\n\u003e - Don't change the component folder names as those are the files being imported into the tests.\n\u003e - **Do not remove the pre-filled code**\n\u003e - Want to quickly review some of the concepts you’ve been learning? Take a look at the Cheat Sheets.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freddy-epk%2Ffruits-counter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Freddy-epk%2Ffruits-counter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freddy-epk%2Ffruits-counter/lists"}