solution#3884
Conversation
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
Review Summary
Decision: Requesting changes due to a checklist violation that must be addressed.
- Critical issue to fix (blocker): In src/components/Sum/Sum.jsx, the paragraph content violates checklist item #2: “Use string interpolation inside tag content.” Currently on the line rendering the paragraph (around the
<p>in Sum.jsx), it uses multiple JSX text/expression nodes:Sum of {a} and {b} is {a + b}. This fails the explicit checklist requirement. - Why this matters: The checklist is a required part of the task. Even though functionality is correct, not following this rule means the submission doesn’t meet the core requirements.
- How to fix: Replace the paragraph content with a single template string interpolation. For example:
{`Sum of ${a} and ${b} is ${a + b}`}
Minor notes: Everything else looks good—named export, default props, and App renders all five required instances correctly. Make this one edit and you should be all set. 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
| // 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 splits the sentence into multiple JSX text and expression nodes (Sum of {a} and {b} is {a + b}) instead of using a single template-string interpolation. Please combine the content into one expression. For example:
<p>{`Sum of ${a} and ${b} is ${a + b}`}</p>Making this change will satisfy the checklist requirement and produce the exact required sentence pattern.
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
Review Summary
Approval: All core requirements are fully met. The Sum component is a named export, defaults a and b to 0, and renders the exact sentence using a single template literal: Sum of ${a} and ${b} is ${a + b}. In src/App.jsx, the five required instances are rendered correctly: (a=2,b=3), (a=-5,b=5), (a=10 only), (b=5 only), and (no props), with short tags on one line where applicable.
Minor suggestions (non-blocking):
- Consider adding PropTypes or TypeScript types to document that
aandbare numbers. - Run
npm testand ensure Prettier/format-on-save is active to align with project standards.
Great job implementing this cleanly and idiomatically.
✨ Please rate this review in the Platform's notification center1. I will be grateful for your feedback! ✨
https://Andrey1166.github.io/react_sum/