{"id":15889276,"url":"https://github.com/srikanth-kandi/react-comments-app","last_synced_at":"2025-07-29T11:04:46.317Z","repository":{"id":205470121,"uuid":"702154315","full_name":"srikanth-kandi/react-comments-app","owner":"srikanth-kandi","description":"Comments App using ReactJS ⚛","archived":false,"fork":false,"pushed_at":"2023-11-04T14:55:02.000Z","size":521,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-02T16:52:03.687Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://srikanth-kandi.github.io/react-comments-app/","language":"JavaScript","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/srikanth-kandi.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,"publiccode":null,"codemeta":null}},"created_at":"2023-10-08T16:49:03.000Z","updated_at":"2023-11-04T14:51:48.000Z","dependencies_parsed_at":null,"dependency_job_id":"aca7adcb-20cb-4967-9438-ea470e53d62a","html_url":"https://github.com/srikanth-kandi/react-comments-app","commit_stats":null,"previous_names":["srikanth-kandi/react-comments-app"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/srikanth-kandi/react-comments-app","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/srikanth-kandi%2Freact-comments-app","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/srikanth-kandi%2Freact-comments-app/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/srikanth-kandi%2Freact-comments-app/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/srikanth-kandi%2Freact-comments-app/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/srikanth-kandi","download_url":"https://codeload.github.com/srikanth-kandi/react-comments-app/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/srikanth-kandi%2Freact-comments-app/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267676958,"owners_count":24126303,"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","status":"online","status_checked_at":"2025-07-29T02:00:12.549Z","response_time":2574,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2024-10-06T06:42:22.817Z","updated_at":"2025-07-29T11:04:46.239Z","avatar_url":"https://github.com/srikanth-kandi.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Comments App using ReactJS ⚛\n\nLive demo - [https://srikanth-kandi.github.io/react-comments-app/](https://srikanth-kandi.github.io/react-comments-app/)\n\nIn this project, let's build a **Comments App** 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/comments-app-output-v0.gif\" alt=\"comments output\" 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/comments-app-sm-output-v2.png)\n- [Medium (Size \u003e= 768px), Large (Size \u003e= 992px) and Extra Large (Size \u003e= 1200px)](https://assets.ccbp.in/frontend/content/react-js/comments-app-lg-output-v0.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 list of comments should be zero and the inputs fields should be empty\n- When non-empty values are provided and **Add Comment** button is clicked,\n  - A new comment should be added to the list of comments\n  - The comments count should be incremented by one\n  - The value of the input fields for name and comment should be updated to their initial values\n- When the **Like** button of a comment is clicked, if the image for **Like** is\n  - [Like](https://assets.ccbp.in/frontend/react-js/comments-app/like-img.png) image, then it should be changed to the [Liked](https://assets.ccbp.in/frontend/react-js/comments-app/liked-img.png) image\n  - [Liked](https://assets.ccbp.in/frontend/react-js/comments-app/liked-img.png) image, then it should be changed to the [Like](https://assets.ccbp.in/frontend/react-js/comments-app/like-img.png) image\n- When the **Delete** button of a comment is clicked, the comment should be deleted from the list of comments and the comments count should be decremented by one\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eComponents Structure\u003c/summary\u003e\n\n\u003cbr/\u003e\n\u003cdiv style=\"text-align: center;\"\u003e\n    \u003cimg src=\"https://assets.ccbp.in/frontend/content/react-js/comments-app-component-breakdown-structure-v0.png\" alt=\"component breakdown structure\" style=\"max-width:100%;box-shadow:0 2.8px 2.2px rgba(0, 0, 0, 0.12)\"\u003e\n\u003c/div\u003e\n\u003cbr/\u003e\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/Comments/index.js`\n- `src/components/Comments/index.css`\n- `src/components/CommentItem/index.js`\n- `src/components/CommentItem/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- The `formatDistanceToNow` function in the **date-fns** package is used to return the gap between the given date and now in words.\n\n```js\nimport {formatDistanceToNow} from 'date-fns'\n\nconsole.log(formatDistanceToNow(new Date())) // less than a minute\n```\n\n\u003c/details\u003e\n\n### Important Note\n\n\u003cdetails\u003e\n\u003csummary\u003eClick to view\u003c/summary\u003e\n\n\u003cbr/\u003e\n\n**The following instructions are required for the tests to pass**\n\n- HTML input element for name should have the placeholder as **Your Name**\n- HTML textarea element for comment should have the placeholder as **Your Comment**\n- The **Like** image for each comment should have the alt as **like**\n- The **Delete** button for each comment should have the data-testid as **delete**\n- To display how much time ago the comment was posted, we will use `formatDistanceToNow` function from **date-fns** package\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/comments-app/comments-img.png](https://assets.ccbp.in/frontend/react-js/comments-app/comments-img.png) alt should be **comments**\n- [https://assets.ccbp.in/frontend/react-js/comments-app/delete-img.png](https://assets.ccbp.in/frontend/react-js/comments-app/delete-img.png) alt should be **delete**\n- [https://assets.ccbp.in/frontend/react-js/comments-app/like-img.png](https://assets.ccbp.in/frontend/react-js/comments-app/like-img.png)\n- [https://assets.ccbp.in/frontend/react-js/comments-app/liked-img.png](https://assets.ccbp.in/frontend/react-js/comments-app/liked-img.png)\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: #dee0e3; width: 150px; padding: 10px; color: black\"\u003eHex: #dee0e3\u003c/div\u003e\n\u003cdiv style=\"background-color: #1e293b; width: 150px; padding: 10px; color: white\"\u003eHex: #1e293b\u003c/div\u003e\n\u003cdiv style=\"background-color: #475569; width: 150px; padding: 10px; color: white\"\u003eHex: #475569\u003c/div\u003e\n\u003cdiv style=\"background-color: #cbd2d9; width: 150px; padding: 10px; color: black\"\u003eHex: #cbd2d9\u003c/div\u003e\n\u003cdiv style=\"background-color: #0284c7; width: 150px; padding: 10px; color: white\"\u003eHex: #0284c7\u003c/div\u003e\n\u003cdiv style=\"background-color: #f59e0b; width: 150px; padding: 10px; color: black\"\u003eHex: #f59e0b\u003c/div\u003e\n\u003cdiv style=\"background-color: #0b69ff; width: 150px; padding: 10px; color: white\"\u003eHex: #0b69ff\u003c/div\u003e\n\u003cdiv style=\"background-color: #f97316; width: 150px; padding: 10px; color: black\"\u003eHex: #f97316\u003c/div\u003e\n\u003cdiv style=\"background-color: #10b981; width: 150px; padding: 10px; color: black\"\u003eHex: #10b981\u003c/div\u003e\n\u003cdiv style=\"background-color: #b91c1c; width: 150px; padding: 10px; color: black\"\u003eHex: #b91c1c\u003c/div\u003e\n\u003cdiv style=\"background-color: #0ea5e9; width: 150px; padding: 10px; color: white\"\u003eHex: #0ea5e9\u003c/div\u003e\n\u003cdiv style=\"background-color: #334155; width: 150px; padding: 10px; color: white\"\u003eHex: #334155\u003c/div\u003e\n\u003cdiv style=\"background-color: #94a3b8; width: 150px; padding: 10px; color: white\"\u003eHex: #94a3b8\u003c/div\u003e\n\u003cdiv style=\"background-color: #64748b; width: 150px; padding: 10px; color: white\"\u003eHex: #64748b\u003c/div\u003e\n\u003cdiv style=\"background-color: #7e858e; width: 150px; padding: 10px; color: white\"\u003eHex: #7e858e\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%2Fsrikanth-kandi%2Freact-comments-app","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsrikanth-kandi%2Freact-comments-app","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsrikanth-kandi%2Freact-comments-app/lists"}