add tasc#3852
Conversation
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
Review Summary
Decision: REQUEST_CHANGES — One explicit checklist requirement is violated.
Why: The Sum component’s paragraph content must be built using a single template literal inside the <p> tag. Currently, it’s split across multiple JSX fragments, which violates checklist item #2 and an explicit implementation detail.
Critical issues to fix (blockers):
- Location: src/components/Sum/Sum.jsx
- Likely around the
<p>tag where the text is rendered (e.g., lines where you haveSum of {a} and {b} is {sum}). - Requirement: Use a single string interpolation expression inside
<p>:{Sum of ${a} and ${b} is ${a + b}}. - Why it’s wrong: The checklist explicitly mandates a single template literal; splitting into multiple JSX nodes doesn’t meet this requirement, even if the output looks the same.
- How to fix (hint): Replace the fragmented JSX with a single template literal. Example:
-
<p>{Sum of ${a} and ${b} is ${a + b}}</p>
-
- Likely around the
What you did well:
- Correct default values for
aandb(default to 0). - Named export for
Sumis correct. App.jsxrenders all five required combinations on single lines where appropriate.
Please make the single-line template literal change in Sum.jsx. Once that’s in place, this will meet all requirements. Nice work overall—this is a quick, one-line fix!
✨ 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 paragraph content to build the text in a single expression: {Sum of ${a} and ${b} is ${a + b}}'.
Currently, the content is split into multiple JSX fragments. It should be a single template literal expression inside the
tag.
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
Review Summary
Decision: APPROVE
Great work! All core requirements are fully met:
Sumis a named export functional component that acceptsaandb, defaults both to0, and renders exactly one<p>with the required template literal:Sum of {a} and {b} is {a + b}.App.jsxrenders the five requiredSumusages with the specified prop combinations, each on a single line as per the style guideline.- No runtime issues or broken functionality were found; output matches the exact expected format.
No critical blockers or checklist violations were identified. Nice job keeping the implementation clean and focused. Keep it up!
✨ Please rate this review in the Platform's notification center1. I will be grateful for your feedback! ✨
DEMO LINK