Conversation
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
Review Summary
Great work on the core logic of the Sum component! It calculates the sum correctly and handles default props well. However, a couple of changes are needed to meet all the project requirements. In src/App.jsx, the Sum components are being passed an extra and word, which is incorrect JSX syntax for props. Please remove it and just separate props with a space, like <Sum a={2} b={3} />. Also, in src/components/Sum/Sum.jsx, your code violates a checklist requirement to use string interpolation [CHECKLIST ITEM #2]. Please update the paragraph to use a single template literal: {Sum of ${a} and ${b} is ${a + b}}. After these fixes, your solution will be perfect!
✨ 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
src/App.jsx
Outdated
| <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> | ||
| <Sum a={2} and b={3} /> |
There was a problem hiding this comment.
The word 'and' is being passed as a prop here, which is incorrect. In JSX, you list props one after another separated by spaces, like <Sum a={2} b={3} />.
src/App.jsx
Outdated
| <p>Sum of 0 and 5 is 5</p> | ||
| <p>Sum of 0 and 0 is 0</p> | ||
| <Sum a={2} and b={3} /> | ||
| <Sum a={-5} and b={5} /> |
There was a problem hiding this comment.
This line also includes an unnecessary and prop.
src/components/Sum/Sum.jsx
Outdated
|
|
||
| return ( | ||
| <p> | ||
| Sum of {a} and {b} is {result} |
There was a problem hiding this comment.
This violates checklist item #2: 'Use string interpolation inside tag content'. For better readability and to follow the project's code style, please use a single template literal here. For example: {`Sum of ${a} and ${b} is ${result}`}.
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
Review Summary
Excellent work on this task! You've successfully addressed all the feedback from the previous review, and the functionality is implemented perfectly. The Sum component correctly calculates and displays the values, and the App component renders all required instances. As a final cleanup step, it's good practice to remove any unused code or comments from the project template in src/App.jsx and src/components/Sum/Sum.jsx. This is a great submission, and I am approving your solution.
✨ Please rate this review in the Platform's notification center1. I will be grateful for your feedback! ✨
Footnotes
src/App.jsx
Outdated
| {/* Replace paragraphs with Sum componets */} | ||
| {/* And remove commented lines :) */} |
There was a problem hiding this comment.
Nice work! Now that you've implemented the components, you can remove these instructional comments.
src/components/Sum/Sum.jsx
Outdated
| @@ -1 +1,7 @@ | |||
| // export const Sum = () => (); | |||
There was a problem hiding this comment.
This commented-out line is left over from the project template. It's a good practice to remove any unused code or comments to keep your components clean.
DEMO LINK