add task solution#3900
Conversation
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
Review Summary
The implementation is functionally correct, but it violates a required checklist rule, which is considered a blocker for this task. Specifically, in src/components/Sum/Sum.jsx, the paragraph content on the line rendering the result uses separate text and JSX expressions (e.g., Sum of {a} and {b} is {a + b}), which breaks [CHECKLIST ITEM #2]: use string interpolation inside tag content.
Required fix:
- In src/components/Sum/Sum.jsx, update the paragraph to a single template-literal expression, for example:
<p>{Sum of ${a} and ${b} is ${a + b}}</p>.
Why: The checklist explicitly requires string interpolation within the tag content, and automated checks may fail otherwise. Everything else looks good: named export, default values, correct sum, and App renders the five required instances correctly. Once you make this small style change, this should be ready to approve. Keep up the good work!
✨ 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 {a} and {b} is {a + b} |
There was a problem hiding this comment.
This violates checklist item #2: "2. [CODE STYLE] - Use string interpolation inside tag content"
The paragraph currently uses separate text and JSX expressions (Sum of {a} and {b} is {a + b}), which produces the correct output but does not follow the required style. See the checklist for the exact requirement and examples .
Consider changing the paragraph to a single template-literal expression, for example:
<p>{`Sum of ${a} and ${b} is ${a + b}`}</p>This will satisfy the checklist and keep behavior identical. (File: src/components/Sum/Sum.jsx)
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
Review Summary
Great work! All core requirements are met: Sum is a named export, provides default values for a and b as 0, and renders the paragraph using a single template literal expression inside JSX. In App.jsx, you correctly render the five required cases: a=2 b=3, a=-5 b=5, a=10 only, b=5 only, and no props, and you keep short-prop JSX on one line, aligning with the style checklist. The arithmetic and handling of negatives/missing props are correct and produce the expected output.
Minor (non-blocking) suggestion: consider adding a couple of simple tests to verify the rendered text for each case, which would help catch regressions in the future. Nicely done—this is ready to merge.
✨ Please rate this review in the Platform's notification center1. I will be grateful for your feedback! ✨
-DEMO LINK