add solution#3901
Conversation
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
Review Summary
Decision: REQUEST_CHANGES
Your implementation is very close, but there is one critical blocker related to the explicit checklist requirement. The paragraph in src/components/Sum/Sum.jsx currently renders as split JSX content: Sum of {a} and {b} is {a + b}. This violates [CHECKLIST ITEM #2: Use string interpolation inside tag content], which requires a single interpolated string inside the tag content.
- Critical issue (must fix): In
src/components/Sum/Sum.jsx(around the<p>line), change the paragraph to a single template literal, e.g.,<p>{Sum of ${a} and ${b} is ${a + b}}</p>. This ensures the content is produced from one interpolated string and will satisfy the checklist/tests.
Everything else looks good: Sum is a named function component with defaults, and App.jsx renders the five required <Sum /> instances correctly. Optional minor improvement: you could use an implicit return for brevity, but it’s not required. Once the interpolation is fixed, your submission should be fully compliant—nice 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
| <p> | ||
| Sum of {a} and {b} is {a + b} | ||
| </p> |
There was a problem hiding this comment.
This violates checklist item #2: "Use string interpolation inside tag content"
-
Current code in src/components/Sum/Sum.jsx renders the paragraph as split JSX content:
Sum of {a} and {b} is {a + b}instead of a single interpolated string, which the checklist specifically forbids (see checklist). -
Please change the paragraph to use a single template string inside the tag content. For example:
<p>{`Sum of ${a} and ${b} is ${a + b}`}</p>This will satisfy the checklist requirement and ensure the paragraph content is produced from one interpolated string.
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
Sorry, the pull request review was unsuccessful for the following reasons:
Warning
No changes were made in the pull request since the last review. Please make sure that you have added files to the pull request and committed the changes.
[CODE: NCM]
If the issue is within your control, please address it.
The next review attempt will automatically launch in about 1 hour.
If you believe this is an error or need assistance, please contact the support team.
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
Review Summary
Decision: APPROVE
Your implementation meets all core requirements. The Sum component is a named export, defaults a and b to 0, and renders the exact sentence in a single <p> with one template literal. In App.jsx, you render the five required instances on single lines: a=2,b=3, a=-5,b=5, a=10, b=5, and with no props. No functional or checklist blockers found.
Minor (non-blocking) suggestions:
- Consider adding PropTypes or TypeScript for runtime/compile-time prop validation.
- Optionally, use an implicit return for a slightly cleaner functional component.
Nice work—clean, correct, and aligned with the task's checklist.
✨ Please rate this review in the Platform's notification center1. I will be grateful for your feedback! ✨
[DEMO LINK] https://dashasssss.github.io/react_sum/