added task solution#3899
Conversation
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
Review Summary
I’m requesting changes due to a checklist violation that blocks acceptance. In src/components/Sum/Sum.jsx, the paragraph content (around line where the <p> is rendered) currently uses multiple JSX expressions: Sum of {a} and {b} is {a + b}. The requirement explicitly states to use a single interpolated string inside the tag content, so the whole sentence must be one expression. Please change it to a single template literal, for example: <p>{Sum of ${a} and ${b} is ${a + b}}</p>. Functionally everything else looks good: defaults for a and b are correct, numeric addition is correct, named export is used, and App.jsx renders the five required cases. As a minor cleanup, you can remove any commented-out stub at the top of Sum.jsx and run your formatter. Once you make this one-line fix, the submission should meet all requirements—great work overall!
✨ 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
|
|
||
| export const Sum = ({a = 0, b = 0}) => ( | ||
| <p> | ||
| Sum of {a} and {b} is {a + b} |
There was a problem hiding this comment.
This violates checklist item #2: "[CODE STYLE] - Use string interpolation inside tag content"
The paragraph currently assembles the sentence with multiple JSX pieces: Sum of {a} and {b} is {a + b}. The checklist explicitly asks for the content to be produced as a single interpolated string expression, e.g.: <p>{Sum of ${a} and ${b} is ${a + b}}</p>.
Please change the paragraph content to a single template literal expression so the output is one JSX expression containing the whole sentence.
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
Review Summary
Decision: APPROVE
Great work! The solution meets all core requirements: Sum is a named functional component with default parameters a = 0 and b = 0, and it renders the paragraph using a single template literal interpolation (fulfilling [CHECKLIST ITEM #2]). In App.jsx, there are exactly five Sum usages with the required prop combinations, and each short JSX tag is on a single line (fulfilling [CHECKLIST ITEM #1]).
No critical or blocking issues were found—functionality and output are correct, and imports are valid. As a minor suggestion, run the test suite locally (npm test) and ensure your formatter is enabled for consistency. Nicely done keeping the implementation concise and aligned with the checklist.
✨ Please rate this review in the Platform's notification center1. I will be grateful for your feedback! ✨
DEMO LINK