react_sum - #4379
Conversation
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
Review Summary
I’m requesting changes because there are two critical blockers preventing the task from meeting the requirements.
- In
src/App.jsx, lines 6–10 contain static<p>tags with hardcoded text. The task requires the App to render outputs viaSumcomponents, not hardcoded paragraphs. Please remove those static<p>tags and ensure onlySumcomponents (already correctly used on lines 11–15) are responsible for rendering the sums. - In
src/components/Sum/Sum.jsx, the<p>content violates the requirement to use string interpolation [CHECKLIST ITEM #2]. The current pattern mixes literals and expressions (the checklist marks this as a bad example). Update it to use a template literal inside the JSX, for example:<p>{Sum of ${a} and ${b} is ${a + b}}</p>.
Once these are fixed, the implementation should align with the task requirements. Nice work on using named exports and providing defaults; keep that as-is and focus on the content rendering changes above.
✨ Please rate this review in the Platform's notification center1. I will be grateful for your feedback! ✨
Important
Fix the issues, commit the changes, and then re-request my review using the Re-request review button2 in the Reviewers tab.
Tip
If you have any comments about this review, please leave a message in the Add a comment section below and mention me with the @mateacademy-ai-mentor tag3.
I will read your message during my next review of your pull request. Please do not reply directly to my comments, as that feature is not supported yet.
Caution
Do not close the pull request until the review is complete. Closing it early can lead to unexpected behavior and disrupt the review process.
Footnotes
| <p>Sum of 2 and 3 is 5</p> | ||
| <p>Sum of -5 and 5 is 0</p> | ||
| <p>Sum of 10 and 0 is 10</p> | ||
| <p>Sum of 0 and 5 is 5</p> | ||
| <p>Sum of 0 and 0 is 0</p> |
There was a problem hiding this comment.
These are static <p> tags, not Sum components. The task requires the App to contain Sum components that render the output dynamically, not hardcoded paragraphs. The actual Sum components are correctly placed on lines 11-15 - these static tags are redundant and incorrect.
| <p> | ||
| Sum of {a} and {b} is {a + b} |
There was a problem hiding this comment.
This violates checklist item #2: Use string interpolation inside tag content. The checklist shows this pattern as a BAD EXAMPLE. Replace with template literal: <p>{Sum of ${a} and ${b} is ${a + b}}</p>
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
Review Summary
I am approving your solution. The Sum component correctly accepts a and b props with sensible defaults, uses a named export, and renders the expected text format. In App.jsx, all five Sum instances are rendered with the specified prop configurations, and the previously noted static paragraphs have been removed. The component tags adhere to the style requirement of using two or fewer attributes on a single line for readability [CHECKLIST ITEM #1]. There are no functional or requirement-related issues observed, and everything aligns with the task’s core specifications. Nicely done keeping the implementation clean and focused.
✨ Please rate this review in the Platform's notification center1. I will be grateful for your feedback! ✨
https://github.com/NataKovbasniuk/react_sum.git