add task solution#3902
Conversation
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
Review Summary
Decision: REQUEST_CHANGES
Your implementation is functionally correct and well-structured, but it violates a critical checklist requirement regarding string construction in the Sum component, which is considered a blocker for this task. Specifically, in src/components/Sum/Sum.jsx, the paragraph content is split across multiple JSX nodes (Sum of {a} and {b} is {a + b}) instead of using a single template-literal interpolation as required by [CHECKLIST ITEM #2] and implementation requirement 3.3.
- What to fix (critical): In
src/components/Sum/Sum.jsx, update the<p>so its entire content is produced by a single string interpolation expression, e.g.,<p>{Sum of ${a} and ${b} is ${a + b}}</p>.
Everything else looks good: named export, default values for a and b, and the App renders the five required Sum instances correctly. Make this one-line change and you should meet all requirements. Nice work overall—just align the paragraph content with the template-literal rule to pass.
✨ 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 = () => (); | ||
| 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: "2. [CODE STYLE] - Use string interpolation inside tag content". The paragraph currently breaks the sentence into multiple JSX nodes (Sum of {a} and {b} is {a + b}) instead of using a single template literal. Also this breaches implementation requirement 3.3 which requires the paragraph’s content be created using a single string interpolation expression.
Consider changing the line to a single interpolation, for example:
<p>{`Sum of ${a} and ${b} is ${a + b}`}</p>That will produce the exact required sentence in one string expression and satisfy the checklist and implementation requirements.
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
Review Summary
Great work! All core requirements are met: the Sum component is a named export, uses default values (a = 0, b = 0), and renders the exact paragraph format using a single template literal. In App.jsx, you correctly render the five required Sum instances (2,3), (-5,5), (10 only), (b=5 only), and with no props, each on a single line [CHECKLIST ITEM #1]. The implementation handles negative and missing values correctly, and the interpolation is done in one expression as required [CHECKLIST ITEM #2].
Minor (non-blocking) suggestion: consider adding PropTypes to Sum for clearer intent and maintainability. 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