Solution#3920
Conversation
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
Review Summary
Decision: REQUEST_CHANGES
Your Sum component is implemented correctly (named export, defaults, and string interpolation are spot on). However, src/App.jsx does not render any Sum components, which violates the task requirements and will cause tests to fail.
Critical issues to fix:
- In
src/App.jsx, replace the placeholder<p>elements (e.g., lines where you currently show “Sum a={2} and b={3}”) with the five requiredSumusages:import { Sum } from './components/Sum/Sum';then render:<Sum a={2} b={3} />,<Sum a={-5} b={5} />,<Sum a={10} />,<Sum b={5} />, and<Sum />. This addresses the requirement that App must render the specified fiveSumcomponents. - [CHECKLIST ITEM #1] Ensure each
Sumusage is a single-line JSX tag since each has fewer than three short attributes (e.g.,<Sum a={2} b={3} />).
Minor note:
- [CHECKLIST ITEM #2] Avoid splitting text/props across multiple JSX expressions in
App.jsx; rely on theSumcomponent’s interpolation.
Make these changes and you should be all set—great work on the Sum component itself!
✨ 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 a={2} | ||
| b={3} | ||
| </p> | ||
| <p> | ||
| Sum a={-5} | ||
| b={5} | ||
| </p> | ||
| <p>Sum a={10}</p> | ||
| <p>Sum b={5}</p> | ||
| <p>Sum</p> |
There was a problem hiding this comment.
This violates the task description requirement that the App must render the specified five Sum components. The description explicitly states: "The App should contain the next Sum components:
a = 2andb = 3;a = -5andb = 5;- just
a = 10; - just
b = 5; - no params at all." Replace the current placeholder
<p>elements with the fiveSumusages and importSumat the top of this file. See the description for the exact required items.
| <p> | ||
| Sum a={2} | ||
| b={3} | ||
| </p> | ||
| <p> | ||
| Sum a={-5} | ||
| b={5} | ||
| </p> |
There was a problem hiding this comment.
This violates checklist item #2 (string interpolation inside tag content). The checklist states: "[CODE STYLE] - Use string interpolation inside tag content" and shows the bad example that splits text and variables across multiple JSX expressions. The current <p> blocks split the text and props across lines (e.g. Sum a={2} and b={3} on separate lines) which matches the bad example. Instead, rely on the Sum component that already uses interpolation ({Sum of ${a} and ${b} is ${a + b}}) or, if you render directly, use the interpolation form.
| <p>Sum a={10}</p> | ||
| <p>Sum b={5}</p> | ||
| <p>Sum</p> |
There was a problem hiding this comment.
Checklist item #1 requires single-line JSX for tags with fewer than three short attributes. The checklist says: "If you have < 3 attribues on a tag and the values are short write the tag in one line ... GOOD EXAMPLE: <Sum a={2} b={3} />". When you replace these placeholders with Sum components, render them as single-line tags (e.g. <Sum a={2} b={3} />, <Sum a={10} />) to comply with the style rule.
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.
https://pavlov-matt.github.io/react_sum/