Add Solution#3843
Conversation
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
Review Summary
Decision: REQUEST_CHANGES
Your implementation is close, but there’s one critical blocker that violates an explicit checklist requirement.
Critical issue to fix
- Location:
src/components/Sum/Sum.jsx(in the<p>element displaying the result) - What’s wrong: The paragraph content is built using multiple JSX expressions (
{a},{b},{sum}) instead of a single template literal inside one expression. - Why it matters: Checklist item #2 requires using a single string interpolation in the
<p>content, e.g., {Sum of ${a} and ${b} is ${a + b}}. This is a strict requirement and may cause checks/tests to fail. - How to fix: Replace the current
<p>content with a single template literal expression. Hint: computeaandb(defaulting to 0 as you do) and render<p>{Sum of ${a} and ${b} is ${a + b}}</p>.
What you did well
- Correctly defaulted
aandbto 0. - Implemented
Sumas a named React function component. App.jsxrenders all requiredSuminstances with proper single-line formatting where applicable.
Please make the small update to the <p> content. Once that’s done, everything else looks solid—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
|
|
||
| return ( | ||
| <p> | ||
| Sum of {a} and {b} is {sum} |
There was a problem hiding this comment.
This violates checklist item #2: "Use string interpolation inside the
tag content to assemble the full sentence in one expression, e.g., {Sum of ${a} and ${b} is ${a + b}}". The current implementation uses multiple JSX expressions instead of a single template literal.
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
Review Summary
Decision: Approve
Why: All core requirements are fully met. The Sum component is a named export that correctly handles a and b with default values of 0, and renders exactly one paragraph with the required interpolated text: Sum of {a} and {b} is {a + b}. In App.jsx, five instances of Sum are rendered with the specified prop combinations, using the correct named import and keeping tags on a single line where appropriate.
What you did well:
- Clean, idiomatic React with concise prop destructuring and defaults.
- Correct string interpolation and output format.
- Proper named export/import usage and exact instances required.
Great work—no changes needed!
✨ Please rate this review in the Platform's notification center1. I will be grateful for your feedback! ✨
No description provided.