Added task solution#3834
Conversation
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
Review Summary
Decision: Request changes — one critical checklist requirement is not met.
Issue to fix (Blocker):
- Location:
src/components/Sum/Sum.jsx, the<p>content (likely around the render return lines) - Requirement: Use a single string interpolation inside the paragraph to form the exact text: "Sum of X and Y is Z".
- What’s wrong: The paragraph currently uses multiple JSX expressions (
{a},{b},{a + b}) instead of one interpolated string. This violates checklist item #2 and the technical constraint to construct the paragraph content in one expression. - How to fix: Replace the multiple expressions with a single template literal inside the tag, for example:
{
.Sum of ${a} and ${b} is ${a + b}}
What you did well:
- Correct named export for
Sumand proper default values foraandb. App.jsxrenders all five requiredSuminstances with the correct prop combinations and clean single-line JSX.
Once you update the paragraph to a single string interpolation, the submission should fully meet all requirements. Nice work overall—this is a quick fix to bring it to completion!
✨ 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: 'Use string interpolation inside the paragraph content to form the text "Sum of X and Y is Z" in one expression.'
Currently, the paragraph uses multiple JSX expressions. It should be:
<p>{`Sum of ${a} and ${b} is ${a + b}`}</p>
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
Review Summary
Decision: APPROVE
Your implementation fully meets the requirements:
- The
Sumcomponent is a named export, acceptsaandbwith defaults of0, and renders exactly one<p>with the sentence using a single template literal:Sum of ${a} and ${b} is ${a + b}. - In
App.jsx, all five requiredSumusages are present with the correct prop combinations, each written on a single line as specified.
No critical or blocking issues were found. Nice job keeping the code concise, readable, and aligned with the checklist. Keep it up!
✨ Please rate this review in the Platform's notification center1. I will be grateful for your feedback! ✨
DEMO LINK